use Scalar::Util 'reftype', 'blessed';
use B 'svref_2object';
-our $VERSION = '0.02';
+our $VERSION = '0.03';
# introspection
my $class = shift;
my $code = shift;
('CODE' eq (reftype($code) || ''))
- || confess "You must supply a CODE reference to bless";
+ || confess "You must supply a CODE reference to bless, not (" . ($code || 'undef') . ")";
bless $code => blessed($class) || $class;
}
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
-=cut
\ No newline at end of file
+=cut
+