Also see Moose::Manual::Delta for more details of, and workarounds
for, noteworthy changes.
+ * replace two more eval { } calls with try { } (doy)
+
0.92 Tue, Sep 22, 2009
* Moose::Util::TypeConstraints
- added the match_on_type operator (Stevan)
use warnings;
use Scalar::Util 'blessed', 'weaken';
+use Try::Tiny;
use overload ();
our $VERSION = '0.92';
# for metatrait aliases.
sub does {
my ($self, $role_name) = @_;
- my $name = eval {
+ my $name = try {
Moose::Util::resolve_metatrait_alias(Attribute => $role_name)
};
return 0 if !defined($name); # failed to load class
if (exists $options->{isa}) {
if (exists $options->{does}) {
- if (eval { $options->{isa}->can('does') }) {
+ if (try { $options->{isa}->can('does') }) {
($options->{isa}->does($options->{does}))
|| $class->throw_error("Cannot have an isa option and a does option if the isa does not do the does on attribute ($name)", data => $options);
}