http://qs321.pair.com?node_id=722383


in reply to from 5.8 to 5.10

You don't provide details of what the WebDB module is, but from perldelta you can see that the B::Bytecode module was removed from perl 5.10.

clint

Replies are listed 'Best First'.
Re^2: from 5.8 to 5.10
by frasco (Beadle) on Nov 08, 2008 at 13:35 UTC

    ... you are right Clinton. WebDB is a simple package I created to manage the database connection. It's a simple script with several subroutines to control the DB connection and to menage the HTML output.

    But above all I don't understand what Bytecode is. This is my whole pragma section:

    #!/usr/bin/perl -w use strict; use warnings; use FindBin qw($Bin); use lib "$Bin/lib"; use WebDB; use CGI qw(:standard :html3); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use utf8; binmode(STDOUT, ':utf8');

    As far I understand I don't make use of something named as Bytecode

      Can you show what stuff do you load in WebDB?

      The problem seems to be that it -or something it relies wants to use it.

        Could try adding
        BEGIN{unshift @INC, sub{warn join q, ! ,, @_, caller;}; }
        example
        C:\>perl -e"BEGIN{unshift @INC, sub{warn join q, ! ,, @_, caller;}; } + use Fjord; use CGI;" CODE(0x225d98) ! Fjord.pm ! main ! -e ! 1 at -e line 1. CODE(0x225d98) ! CGI.pm ! main ! -e ! 1 at -e line 1. CODE(0x225d98) ! Carp.pm ! CGI ! C:/Perl/lib/CGI.pm ! 3 at -e line 1. CODE(0x225d98) ! Exporter.pm ! Carp ! C:/Perl/lib/Carp.pm ! 193 at -e +line 1. CODE(0x225d98) ! CGI/Util.pm ! CGI ! C:/Perl/lib/CGI.pm ! 27 at -e lin +e 1. CODE(0x225d98) ! strict.pm ! CGI::Util ! C:/Perl/lib/CGI/Util.pm ! 3 a +t -e line 1. CODE(0x225d98) ! vars.pm ! CGI::Util ! C:/Perl/lib/CGI/Util.pm ! 4 at +-e line 1. CODE(0x225d98) ! warnings/register.pm ! vars ! C:/Perl/lib/vars.pm ! 7 + at -e line 1. CODE(0x225d98) ! warnings.pm ! warnings::register ! C:/Perl/lib/warnin +gs/register.pm ! 24 at -e line 1. CODE(0x225d98) ! constant.pm ! CGI ! C:/Perl/lib/CGI.pm ! 33 at -e lin +e 1. CODE(0x225d98) ! overload.pm ! Fh ! C:/Perl/lib/CGI.pm ! 3717 at -e li +ne 1. C:\>
        package WebDB; use warnings; use strict; use DBI; use utf8; use Encode qw(decode encode); binmode(STDOUT, ':utf8'); my $host_name = "xxx"; my $db_name = "xxx"; my $dsn = "DBI:mysql:database=$db_name;host=$host_name;"; # Connect to MySQL server, using hardwired name and password sub connect { return (DBI->connect ($dsn, "xxx", "xxx", {RaiseError => 1, mysql +_enable_utf8 => 1}) or die ("Cannot connect: $DBI::errstr")); } sub Get_Item_Table { my $dbh = shift; my $ref = shift; my $sql_item = qq(SELECT ID_catalogo, tavoletta, scuola, tipolog +ia, tipo, copia_di FROM CATALOGO WHERE tavoletta LIKE '$ref%'); my $sth_item = $dbh->prepare($sql_item); $sth_item->execute(); return($sth_item); } sub parsing { my $riga = shift; # ? e ! $riga =~ s/(\?)/<sup>$1<\/sup>/g; $riga =~ s/(\!)/<sup>$1<\/sup>/g; $riga =~ s/(@)/&nbsp;/g; $riga =~ s/ /&nbsp;&nbsp;/g; $riga; } 1;