projects
/
scpubgit/Tak.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
new remote code
[scpubgit/Tak.git]
/
lib
/
Tak
/
Result.pm
diff --git
a/lib/Tak/Result.pm
b/lib/Tak/Result.pm
index
a7afb4f
..
2c06242
100644
(file)
--- a/
lib/Tak/Result.pm
+++ b/
lib/Tak/Result.pm
@@
-5,6
+5,8
@@
use Moo;
has type => (is => 'ro', required => 1);
has data => (is => 'ro', required => 1);
+sub flatten { $_[0]->type, @{$_[0]->data} }
+
sub get {
my ($self) = @_;
$self->throw unless $self->type eq 'success';