make "perl -c script/re.pl" not start up the REPL
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Error.pm
1 package Devel::REPL::Error;
2 use Moose;
3
4 # FIXME get nothingmuch to refactor and release his useful error object
5
6 has type => (
7   isa => "Str",
8   is  => "ro",
9   required => 1,
10 );
11
12 has message => (
13   isa => "Str|Object",
14   is  => "ro",
15   required => 1,
16 );
17
18 sub stringify {
19   my $self = shift;
20
21   sprintf "%s: %s", $self->type, $self->message;
22 }
23 __PACKAGE__
24
25 __END__