Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
For what it's worth, here's my fiddling with -s and modules. Consider the following toy module (With horrible style. Don't write real code like this, kids ;): And the following little script:
With the following command line, this will print "Hey Monks!"
If, on the other hand, I uncomment line 2 in MyMod.pm, setting the default value of the variable to "Ding", the same command line will return the value set in the module.
To my eyes, this allows -s to set uninitialised module variables from the command line, but it will not override variables already defined. I don't really see how this can come in handy though. Perhaps some funky obfuscation? Oh well. Curiosity strikes again :) pernod In reply to Playing with module::variables and -s
by pernod
|
|