On Tue, 10 Jun 2003, Randal L. Schwartz wrote:
> That's the hard way. How about simply...
>
> sub blessed {
> eval { shift->can("can") };
> return !$@;
> }
As is obvious from the code that I omitted though my stupid inability not
to operate cut and paste properly:
> sub UNIVERSAL::a_sub_not_likely_to_be_here { ref($_[0]) }
You see that need to check that you're not being passed a plain old string
(as Perl will interpret that as a class name, and yep, all class names can
can (Ooh La la!)
Eeek, this is wildly off topic.
Mark.
--
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, [EMAIL PROTECTED], http://twoshortplanks.com/};
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates