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 ]

pdcawley (485)

pdcawley
  (email not shown publicly)
http://www.bofh.org.uk/
AOL IM: pdcawley (Add Buddy, Send Message)

Journal of pdcawley (485)

Friday October 12, 2001
05:54 AM

Oh dear me

[ #975 ]
You know how it is, you're yakking away with friends on IRC and someone proposes:

    sub UNIVERSAL::cant { ! UNIVERSAL::can(@_) };

Which is all very well, but consider:

    sub can't {
        my $self = shift;
        !(ref($self) ? $self->can(@_)
            : UNIVERSAL::can($self, @_));
    }

    sub isn't { ... }

At present, this valid, but scary perl syntax. Even in an OO context, you should find that $obj->can't('method') will work...

Eew.