Revision history for Perl extension Class-MOP.
+0.37
+ * Class::MOP::Attribute
+ - default now checks the instance with defined to
+ avoid setting off bool-overloads (found by Carl Franks)
+
0.36 Sun. Nov. 5, 2006
* Class::MOP::Class
- added a few 'no warnings' lines to keep annoying
use Carp 'confess';
use Scalar::Util 'blessed', 'reftype', 'weaken';
-our $VERSION = '0.13';
+our $VERSION = '0.14';
our $AUTHORITY = 'cpan:STEVAN';
use base 'Class::MOP::Object';
sub default {
my ($self, $instance) = @_;
- if ($instance && $self->is_default_a_coderef) {
+ if (defined $instance && $self->is_default_a_coderef) {
# if the default is a CODE ref, then
# we pass in the instance and default
# can return a value based on that