Stories
Slash Boxes
Comments
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

use Perl Log In

Log In

[ Create a new account ]

davorg (18)

davorg
  dave@dave.org.uk
http://dave.org.uk/
Yahoo! ID: daveorguk (Add User, Send Message)

Hacker, author, trainer

Technorati Profile [technorati.com]

Journal of davorg (18)

Wednesday July 23, 2003
10:41 AM

YAPC Day 1

[ #13644 ]

Last minutes changes of schedule meant that I did my talk on Tieing and Overloading Objects in Perl today instead of on Friday. I've now put the slides online.

I'm currently sitting an ad-hoc session of london.pm talks listening to Piers talking about doing very scary things by overloading the global definition of bless!

Oh, and my new article is now on perl.com.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Very nice article, I liked it.

    A question, though: I admit I don't understand all the magic behind overloading constants, but shouldn't the example on page 2

    return __PACKAGE__->new($_[0]) || $_[1]
    be testing the result of the constructor call with defined()? Is it possible, with all the overloading going on, that the result of new('0/1') would be interpreted as a number 0 and thus appear to fail?
  • 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