skunspauk has asked for the wisdom of the Perl Monks concerning the following question:

Hi - I have a Perl-based CGI script which used to run perfectly fine under Perl v5.00? (4? not sure), but which does not work at all under v5.6 (my dagblasted sysadmin changed versions on me without letting me know, so I'm scrambling to fix the problem).

Firstly, is there a list of modifications between different versions of Perl that I can peruse? I checked the FAQ and didn't see any such thing.

Secondly, might anyone know why the following code no longer works? It worked fine just yesterday... assume that $action and $package are not hardcoded, but are values that were looked up in a database....

my @vars; my $action = 'doit'; my $package = 'myperl::package'; eval "require $package"; &error( "No such package: $package ? ($! $@)" ); my $act = $package->new( $action ) or &error( "No proper action taken" + ); &$act( @vars ) or &error( "Failure to act" );
The code works fine until the last line, and then just stops (doesn't even display the error message). Any insight would be greatly appreciated....

Replies are listed 'Best First'.
Re: changes between Perl v5.00? to v5.6
by Albannach (Monsignor) on Nov 23, 2001 at 02:59 UTC
    The document(s) you should be looking at are called perldelta and there are several in the pages for 5.6.1. The docs here at the Monastery are a bit old but you can find what you're looking for at perldoc.

    --
    I'd like to be able to assign to an luser

Re: changes between Perl v5.00? to v5.6
by mkmcconn (Chaplain) on Nov 23, 2001 at 01:38 UTC

    Is it possible that @INC was changed by the upgrade? Perhaps (just guessing) 5.00(5.3?) was installed under an unusual or specific directory structure, upon which the script depends?
    p.s. anyway, to directly answer your question, type
    perldoc perldelta
    (and now I see that Albannach++ beat me to this update.)
    mkmcconn

Re: changes between Perl v5.00? to v5.6
by skunspauk (Initiate) on Nov 23, 2001 at 00:05 UTC
    one 'oops': the line after eval "require $package"; should read: &error( "No such package: $package ? ($! $@)" ) if( $@ );

    (I left out the IF part in my first posting)