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

Re^5: importing functions with "PerlModule" Apache directive

by tobyink (Abbot)
on May 09, 2012 at 14:03 UTC ( #969629=note: print w/ replies, xml ) Need Help??


in reply to Re^4: importing functions with "PerlModule" Apache directive
in thread importing functions with "PerlModule" Apache directive

You're not using strict, so of course local our $p=Vars will work. It's just an assignment of a string to a package variable. Compare:

$ perl -ce'local our $p=Vars' -e syntax OK

versus:

$ perl -Mstrict -ce'local our $p=Vars' Bareword "Vars" not allowed while "strict subs" in use at -e line 1. -e had compilation errors.

Also of interest:

$ perl -MO=Deparse -e'local our $p=Vars' local $p = 'Vars'; -e syntax OK
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re^5: importing functions with "PerlModule" Apache directive
Select or Download Code
Re^6: importing functions with "PerlModule" Apache directive
by Anonymous Monk on May 09, 2012 at 14:06 UTC

    :) but but but but but but but but acanfora says that Vars() is available :P

Re^6: importing functions with "PerlModule" Apache directive
by acanfora (Novice) on May 09, 2012 at 14:44 UTC
    My question is not about barewords. I can use Vars or Vars(), no matter what, my point is not that. The point is about _visibility_ of _function_ Vars in script _whithout_ pass through CGI object instantiation and _whithout_ explicitly importing anything via qw(whatever). Sorry for my bad English.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2014-09-18 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (108 votes), past polls