I'm sure I'm missing something awfully basic here.
The basic something that you are missing is: objects in Perl are references to blessed value containers.
With $img = shift, you're copying the reference, not the object itself. Try $img = shift->Copy;.
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
In reply to Re: Object passed by reference or value?
by Juerd
in thread Object passed by reference or value?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |