File: OverflowHandler.pm

package info (click to toggle)
libmoosex-types-structured-perl 0.36-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 492 kB
  • sloc: perl: 757; makefile: 11
file content (25 lines) | stat: -rw-r--r-- 444 bytes parent folder | download | duplicates (3)
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
package ## Hide from PAUSE
  MooseX::Types::Structured::OverflowHandler;

our $VERSION = '0.36';

use Moose;

use overload '""' => 'name', fallback => 1;

has type_constraint => (
    is       => 'ro',
    isa      => 'Moose::Meta::TypeConstraint',
    required => 1,
    handles  => [qw/check/],
);

sub name {
    my ($self) = @_;
    return 'slurpy(' . $self->type_constraint->name . ')';
}

no Moose;
__PACKAGE__->meta->make_immutable;

1;