Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • The article had some very nice examples in it, especially for the use of constant overloading. I used to think that was only good for confusing your coworkers with "zero but true"-hacks.

    I'm not sure your arguments hold true, that the code would be less clean in Java. Having multiple methods would be much nicer in my opionion. Maybe it's just me, but I think that elsif is one of the ugliest constructs ever invented (right after the switch statement).

    I know that its not possible in Perl, but I think its a shame that you cant implement the constructor in 3 lines using double dispatch (as described in Kent Becks pattern book).

    For a very useful use of overloading, check out my module Class::Void []

    Disclaimer: I don't expect anyone to find my module useful, but I use it every day as way to make really dumb business objects :)