Don't ask to ask, just ask | |
PerlMonks |
glob'ing and variable settingby Bloodnok (Vicar) |
on Dec 31, 2013 at 14:59 UTC ( [id://1068802]=perlquestion: print w/replies, xml ) | Need Help?? |
Bloodnok has asked for the wisdom of the Perl Monks concerning the following question:
Greetings and a HNY for 2014 to all you fellow monasterians ,
I have a module that should be capable of auto-exporting, via the import() sub, an initialized variable, $VAR, via a typeglob i.e. not via Exporter, into the useing packages namespace. At its simplest (I'm afraid that I'm not at liberty to divulge the exact details), my module code is along the lines of ... The variable is, indeed, set i.e. I see "Some_val" c/w "Something's wrong", if the declaration is made thus... My question now is, what have I overlooked such that cases where the variable declaration is made in a list work e.g. neither of the following 2 cases work... or In both of the above cases, I see the "Something's wrong" warning. Any thoughts/insights etc. gratefully received TIA , Further update: Code will never run without relaxing <C>strict refs<C/> ... doh!! Update: Add clarification thanx to choroba who was good enough to point out the lack of clarity in the OP.
A user level that continues to overstate my experience :-))
Back to
Seekers of Perl Wisdom
|
|