in reply to Overloading print()
Reading code, I'd expect:
andprint $blessed_obj;
to do the same thing.print "$blessed_obj";
Overloading can be very convenient, but too much magic can hurt maintainability.
Of course, it's always good to learn, so could you perhaps share the situation you're in where it would be handy for these two to behave differently?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Overloading print()
by syphilis (Archbishop) on Sep 05, 2007 at 09:29 UTC | |
by moritz (Cardinal) on Sep 05, 2007 at 09:46 UTC | |
by syphilis (Archbishop) on Sep 05, 2007 at 09:51 UTC | |
by moritz (Cardinal) on Sep 05, 2007 at 10:52 UTC | |
by syphilis (Archbishop) on Sep 05, 2007 at 12:36 UTC | |
| |
by jbert (Priest) on Sep 05, 2007 at 10:15 UTC | |
by syphilis (Archbishop) on Sep 05, 2007 at 12:57 UTC | |
by pilcrow (Sexton) on Sep 05, 2007 at 17:28 UTC | |
by syphilis (Archbishop) on Sep 06, 2007 at 05:52 UTC |