Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Oh Monks, I am in need of your assistance again. I am trying to sub-class a module that makes of a lexical (my) variable set at the package level. I need to change the change the value of this variable in my module; however, I cannot figure out how to do this. The following code is representative of the other module and what I would like to do.
My desired approach - which won't work as shown - is something like this:
An example of using these modules is:
With the desired output being:
Any assistance in figuring out a way around this conundrum short of modifying the first module would be greatly appreciated. Having said that, I am trying to to get the first module modified to include constructors for changing this variable. As always, thanks in advance for your assistance! lbe In reply to Can you override lexically scoped variables when sub-classing a module. by learnedbyerror
|
|