Exception-Base

 view release on metacpan or  search on metacpan

lib/Exception/Base.pm  view on Meta::CPAN

968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
    no warnings 'uninitialized';
    foreach my $key (keys %args) {
        if ($attributes->{$key}->{is} eq 'rw') {
            $e->{$key} = $args{$key};
        };
    };
 
    # Defaults for this object
    $e->{defaults} = { %$defaults };
 
    bless $e => $class;
 
    # Collect system data and eval error
    $e->_collect_system_data;
 
    return $e;
};
 
 
=head1 METHODS

lib/Exception/Base.pm  view on Meta::CPAN

1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
    my %args = @_;
    my $attrs = $old_e->ATTRS;
    foreach my $key (keys %args) {
        if ($attrs->{$key}->{is} eq 'rw') {
            $old_e->{$key} = $args{$key};
        };
    };
    $old_e->PROPAGATE;
    if (ref $old_e ne $class) {
        # Rebless old object for new class
        bless $old_e => $class;
    };
 
    die $old_e;
};
 
 
=item I<CLASS>-E<gt>catch([$I<variable>])
 
The exception is recovered from I<variable> argument or C<$@> variable if
I<variable> argument was empty.  Then also C<$@> is replaced with empty string



( run in 1.113 second using v1.01-cache-2.11-cpan-49f99fa48dc )