File: Error.pm

package info (click to toggle)
libdevel-repl-perl 1.003011-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 408 kB
  • ctags: 252
  • sloc: perl: 3,380; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 381 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl

package Devel::REPL::Error;
use Moose;

# FIXME get nothingmuch to refactor and release his useful error object

has type => (
  isa => "Str",
  is  => "ro",
  required => 1,
);

has message => (
  isa => "Str|Object",
  is  => "ro",
  required => 1,
);

sub stringify {
  my $self = shift;

  sprintf "%s: %s", $self->type, $self->message;
}
__PACKAGE__

__END__