projects
/
p5sagit/Devel-REPL.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Move to Moo for fast bootstrapping.
[p5sagit/Devel-REPL.git]
/
lib
/
Devel
/
REPL
/
Error.pm
1
#!/usr/bin/perl
2
3
package Devel::REPL::Error;
4
use Moo;
5
use MooX::Types::MooseLike::Base qw(Str Object AnyOf);
6
7
# FIXME get nothingmuch to refactor and release his useful error object
8
9
has type => (
10
isa => Str,
11
is => "ro",
12
required => 1,
13
);
14
15
has message => (
16
isa => AnyOf[Str, Object],
17
is => "ro",
18
required => 1,
19
);
20
21
sub stringify {
22
my $self = shift;
23
24
sprintf "%s: %s", $self->type, $self->message;
25
}
26
__PACKAGE__
27
28
__END__