Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Inside the framework package you declare $date as a lexical variable. This means that the variable is only visible inside the framework.pl file. Inside your main package, you try to access a package variable called $framework::date. This is a completely separate variable to the lexical that you declared previously. This is why updating it has no effect on the output from testcase1 - you're updating the wrong variable. Easiest solution is to replace the lexical variable declaration with a package variable declaration in framework.pl like this:
(or our $date if you're using Perl 5.6.x) --<http://www.dave.org.uk> "The first rule of Perl club is you don't talk about Perl club." In reply to Re: package/scope question
by davorg
|
|