in reply to Re^4: Modules for a source filter
in thread Modules for a source filter

What do you suppose this is doing?
my $Magic = shift; my $itoa64 = shift; $Magic = q/$1$/; # Magic string $itoa64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu +vwxyz";
B::Deparse shows it is
$Magic = shift @ARGV;
@ARGV is normally empty under CGI/mod_perl...

Replies are listed 'Best First'.
Re^6: Modules for a source filter
by Anonymous Monk on Jun 15, 2011 at 06:29 UTC
    What do you suppose this is doing?

    The last two lines are from the original Crypt::PasswdMD5 code. I thought $Magic = q/$1$/;

    prefaced the unix_md5_crypt string and was also added to the password along with the salt prior to encrypting. The other

    $itoa64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
    is used for the 'to64' subroutine which is then used by the 'unix_md5_crypt' subroutine.

    I tried replacing the lines with

    my $Magic = shift @ARGV;

    and
    my $Magic = shift; $Magic = @ARGV;

    but I kept getting this error.

    "Error executing class callback in prerun stage: No filters found for 'cpwdmd5'...."