Skip to content

Commit

Permalink
Simplify Failure creation
Browse files Browse the repository at this point in the history
I assume the original code is very old and predates any implicit BUILD
functionality.
  • Loading branch information
lizmat committed Nov 27, 2014
1 parent 482cc32 commit 1e4fe4a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/core/Failure.pm
Expand Up @@ -4,15 +4,7 @@ my class Failure {
has $.exception;
has $!handled;

method new($ex) {
my $new = self.CREATE;
$new.BUILD($ex);
}

method BUILD($ex) {
$!exception = $ex;
self;
}
method new($exception) { self.bless(:$exception) }

# TODO: should be Failure:D: multi just like method Bool,
# but obscure problems prevent us from making Mu.defined
Expand Down

0 comments on commit 1e4fe4a

Please sign in to comment.