sub loadEttx($){ ... $self=>{ettx} = $xml->XMLin(shift); } sub loadTemplate($){ ... $self=>{template} = $xml->XMLin(shift); }
The error pointed out by BrowserUk is actually present twice in the posted code (AFAICS).
In addition, there's no point in prototyping all the methods: prototypes are ignored in method calls. (The general monastic wisdom is: Just don't ever bother with prototypes unless you really know what they do and why you need one in a particular case!)
Update: The methods in the OPed code are prototyped to take either zero or one, or else exactly one, scalar arguments – but all three methods take two arguments! Again, it doesn't matter because no prototype checking is ever done.
In reply to Re: can't modify anonymous hash ({}) in scalar assignment
by AnomalousMonk
in thread can't modify anonymous hash ({}) in scalar assignment
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |