0.41
~~ numerous documentation updates ~~
+
+ - Changed all usage of die to Carp::croak for better
+ error reporting (initial patch by Tod Hagan)
** IMPORTANT NOTE **
- the make_immutable keyword is now deprecated, don't
- inherited attributes may now be extended without
restriction on the type ('isa') (Sartak)
- added tests for this (Sartak)
+ - when an attribute property is malformed (such as lazy without
+ a default), give the name of the attribute in the error
+ message (Sartak)
+
0.40 Fri. March 14, 2008
- I hate Pod::Coverage
our $AUTHORITY = 'cpan:STEVAN';
use Scalar::Util 'blessed', 'reftype';
-use Carp 'confess';
+use Carp 'confess', 'croak';
use Sub::Name 'subname';
use Sub::Exporter;
my $class = $CALLER;
return subname 'Moose::has' => sub ($;%) {
my $name = shift;
- die 'Usage: has \'name\' => ( key => value, ... )' if @_ == 1;
+ croak 'Usage: has \'name\' => ( key => value, ... )' if @_ == 1;
my %options = @_;
my $attrs = ( ref($name) eq 'ARRAY' ) ? $name : [ ($name) ];
$class->meta->add_attribute( $_, %options ) for @$attrs;
# Moose::Util::apply_all_roles
# instead
sub _apply_all_roles {
- die 'DEPRECATED: use Moose::Util::apply_all_roles($meta, @roles) instead'
+ Carp::croak 'DEPRECATED: use Moose::Util::apply_all_roles($meta, @roles) instead'
}
sub _process_attribute {
$self->apply_after_method_modifiers(@_);
}
-sub check_role_exclusions { die "Abstract Method" }
-sub check_required_methods { die "Abstract Method" }
-sub check_required_attributes { die "Abstract Method" }
-
-sub apply_attributes { die "Abstract Method" }
-sub apply_methods { die "Abstract Method" }
-sub apply_override_method_modifiers { die "Abstract Method" }
-sub apply_method_modifiers { die "Abstract Method" }
+sub check_role_exclusions { Carp::croak "Abstract Method" }
+sub check_required_methods { Carp::croak "Abstract Method" }
+sub check_required_attributes { Carp::croak "Abstract Method" }
+
+sub apply_attributes { Carp::croak "Abstract Method" }
+sub apply_methods { Carp::croak "Abstract Method" }
+sub apply_override_method_modifiers { Carp::croak "Abstract Method" }
+sub apply_method_modifiers { Carp::croak "Abstract Method" }
sub apply_before_method_modifiers { (shift)->apply_method_modifiers('before' => @_) }
sub apply_around_method_modifiers { (shift)->apply_method_modifiers('around' => @_) }
## this should get deprecated actually ...
-sub union { die "DEPRECATED" }
+sub union { Carp::croak "DEPRECATED" }
1;