MooseX::Singleton - turn your Moose class into a singleton
VERSION
- Version 0.16
+ Version 0.18
SYNOPSIS
package MyApp;
use MooseX::Singleton::Object;
use MooseX::Singleton::Meta::Class;
-our $VERSION = '0.17';
+our $VERSION = '0.18';
$VERSION = eval $VERSION;
Moose::Exporter->setup_import_methods( also => 'Moose' );
=head1 VERSION
-Version 0.16, released 24 May 08
+Version 0.18, released 24 May 08
=head1 SYNOPSIS
defined $_ ? $_->_compiled_type_constraint : undef;
} @type_constraints;
- my $code = $self->_compile_code(
+ my ( $code, $e ) = $self->_compile_code(
code => $source,
environment => {
'$meta' => \$self,
'@type_constraints' => \@type_constraints,
'@type_constraint_bodies' => \@type_constraint_bodies,
},
- ) or $self->throw_error("Could not eval the constructor :\n\n$source\n\nbecause :\n\n$@", error => $@, data => $source );
+ );
+
+ $self->throw_error("Could not eval the constructor :\n\n$source\n\nbecause :\n\n$e", error => $e, data => $source )
+ if $e;
$self->{'body'} = $code;
}
$self->bag->{$key} += $value;
}
-
+__PACKAGE__->meta->make_immutable;
::warning_is sub { __PACKAGE__->meta->make_immutable }, '',
'no warnings when calling make_immutable';
}