Goto undefined subroutine &Carp::longmess_real at /usr/share/perl5/Carp.pm line 35, line 1. #### #!/usr/bin/perl BEGIN { push @INC, "/home/neil/perl5/lib/perl5" } use strict; use warnings; use local::lib; use Evolvethinking::Mymodule; use POSIX 'strftime'; #### package Mymodule; { use Mouse; use Mouse::Util::TypeConstraints; use Socket; ... subtype 'my_timestamp', => as 'Str', => where { m/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/ }, => message { 'Not a valid timestamp. Expect: yyyy-mm-dd hh:mm' }; has 'timestamp' => ( is => 'ro', isa => 'my_timestamp' ); #### Attribute (insert_class) does not pass the type constraint because: Not a valid class at /home/neil/perl5/lib/perl5/x86_64-linux-thread-multi/Mouse/Util.pm line 383, line 1. Mouse::Util::throw_error('Mouse::Meta::Attribute=HASH(0x1618698)', 'Attribute (insert_class) does not pass the type constraint be...', 'data', '192_168_0_151', 'depth', -1) called at /home/neil/perl5/lib/perl5/x86_64-linux-thread-multi/Mouse/Util.pm line 383, line 1. Mouse::Util::throw_error('Mouse::Meta::Attribute=HASH(0x1618698)', 'Attribute (insert_class) does not pass the type constraint be...', 'data', '192_168_0_151', 'depth', -1) called at ./p1.pl line 35 .... subtype 'my_insert_class', => as 'Str', => where { m/^[a-zA-Z0-9]+$/ }, => message { '$_ is not a valid class' }; has 'insert_class' => ( is => 'rw', isa => 'my_insert_class' );