File: Error.pm

package info (click to toggle)
libdevel-repl-perl 1.003029-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 524 kB
  • sloc: perl: 1,736; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 410 bytes parent folder | download
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
package Devel::REPL::Error;

our $VERSION = '1.003029';

use Moose;
use namespace::autoclean;

# 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__