Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: unknown code

by karlgoethebier (Abbot)
on Feb 14, 2018 at 10:22 UTC ( [id://1209124]=note: print w/replies, xml ) Need Help??


in reply to unknown code

1): Aha - it's a fallback. Full code from File::Find:

# check whether or not a scalar variable is tainted # (code straight from the Camel, 3rd ed., page 561) sub is_tainted_pp { my $arg = shift; my $nada = substr( $arg, 0, 0 ); # zero-length local $@; eval { eval "# $nada" }; return length($@) != 0; } # We need a function that checks if a scalar is tainted. # Either use the # Scalar::Util module's tainted() function # or our (slower) pure Perl # fallback is_tainted_pp() { local $@; eval { require Scalar::Util }; *is_tainted = $@ ? \&is_tainted_pp : \&Scalar::Util::tainted; }

And i'm banging my head against a wall to understand it. This code mucked my day ;-)

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1209124]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-29 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found