in reply to Re^3: from 5.8 to 5.10
in thread from 5.8 to 5.10

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;

Replies are listed 'Best First'.
Re^5: from 5.8 to 5.10
by szabgab (Priest) on Nov 08, 2008 at 14:03 UTC
    I don't see anything in there related.

    I even tried to load it on my newly upgraded Ubuntu 8.10 with perl 5.10 and it said everything is ok.

      Thank you. Probably there's some mistakes in my Apache2 setup, but I can't figure it out what. Are you use Geany? Till now it was of great help for me (I'm not an advanced programmer, that's sure!!), but maybe the built-in debugger doesn't work properly with Perl 5.10

        No, I am using Padre.

        ;-)

Re^5: from 5.8 to 5.10
by JadeNB (Chaplain) on Nov 10, 2008 at 00:36 UTC
    It's possible (I guess) that you have an outdated version of one of the modules here that would somehow require B::Bytecode. (The first thing I'd try is updating them, anyway.) One way to see where the problem is is to precede every use with a diagnostic message:
    BEGIN { warn "About to use a"; } use a; BEGIN { warn "About to use b"; } use b;
    (The BEGINs are necessary because use statements are implicitly wrapped in BEGINs themselves.) If you don't see About to use b, then you'll know that the error was caused somewhere in the course of executing use a.

    UPDATE: On further reading (and a bit of clumsy line-counting), it looks like the error is being thrown on the DBI->connect line. I don't have DBI installed, so can't test; but maybe someone else knows whether this method might try to use B::Bytecode for some reason?