2009/1/28 Aristotle Pagaltzis <pagaltzis@gmx.de>: > * chromatic <chromatic@wgz.org> [2009-01-27 20:55]: >> Nitpicking: >> >> use Test::More tests => 1; >> >> sub blessed { >> my $var = shift; >> return UNIVERSAL::can($var, 'can') && ref($var); >> } >> >> ok( ! blessed( qr// ), 'compiled regexp is not blessed' ); > > Nitpicking: > > use Test::More tests => 1; > use Scalar::Util 'blessed'; > > ok( ! blessed( qr// ), 'compiled regexp is not blessed' ); > > Freaky, though: > > $ perl -le'print qr//->can('can')' > CODE(0x814cee8) > > Heh. I dont get the joke. qr// returns a blessed reference. So what does the nitpicking prove? perl -le'print qr//->can("can"); print UNIVERSAL->can("can")' CODE(0x8153ed4) CODE(0x8153ed4) No big surprise here. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next