throop has asked for the wisdom of the Perl Monks concerning the following question:
When I come back from markFail, the info is in %problemClassProps, not %MEClassProps, and I lose it when I exit the scope of assign_ME_problem. I want to (locally) alias %MEClassProps to %problemClassProps. I looked through data::alias figuring it would tell me how, but no joy. I want to leave the old code alone. What's the right way to approach this?use strict; use vars qw( %problemClassProps %MEClassProps ); sub assign_ME_problem{ my($ontCategory, $ontNumbering, $mapwd) =@_; local(%problemClassProps) = %MEClassProps; markFail($mapwd, $ontCategory, $ontNumbering); 1}
thanks,
throop
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Aliasing one hash to another
by imp (Priest) on Jan 30, 2007 at 22:56 UTC | |
Re: Aliasing one hash to another
by Roy Johnson (Monsignor) on Jan 30, 2007 at 22:54 UTC | |
Re: Aliasing one hash to another
by Zaxo (Archbishop) on Jan 30, 2007 at 23:31 UTC | |
Re: Aliasing one hash to another
by jdporter (Paladin) on Jan 30, 2007 at 23:55 UTC | |
Re: Aliasing one hash to another
by xmath (Hermit) on Feb 11, 2007 at 12:16 UTC |