Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Context: compile-time vs. run-time

by shmem (Canon)
on Jan 25, 2009 at 19:22 UTC ( #738799=note: print w/ replies, xml ) Need Help??


in reply to Re: Context: compile-time vs. run-time
in thread Context: compile-time vs. run-time

If that's the case, it isn't either - since first thing string eval does is to compile.


Comment on Re^2: Context: compile-time vs. run-time
Re^3: Context: compile-time vs. run-time
by bart (Canon) on Jan 25, 2009 at 22:02 UTC
    I think he means to modify the code to eval.
    eval +($f > 0 ? '@a' : '$a' ) . ' = ("a", "b", "c")';
Re^3: Context: compile-time vs. run-time
by Anonymous Monk on Jan 26, 2009 at 00:59 UTC
    But its still runtime for shmem :)
    D:\>cat shmem #!/usr/bin/perl print "Hi, i'm shmem, this is runtime for me\n"; eval "use shmem; its still runtime for shmem\n"; warn $@ if $@; D:\>perl shmem Hi, i'm shmem, this is runtime for me Can't locate shmem.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site +/lib .) at (eval 1) li ne 1. BEGIN failed--compilation aborted at (eval 1) line 1. D:\> D:\>cat shmem2 #!/usr/bin/perl print "Hi, i'm shmem, this is runtime for me\n"; eval "use CGI; its still runtime for shmem\n"; warn $@ if $@; D:\>perl shmem2 Hi, i'm shmem, this is runtime for me Can't locate object method "its" via package "still" (perhaps you forg +ot to load "still"?) at (eval 1) line 1. D:\>

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (14)
As of 2014-07-22 16:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (119 votes), past polls