Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I'm getting this error message that is to vague for me to follow.
Goto undefined subroutine &Carp::longmess_real at /usr/share/perl5/Car line 35, <FH> line 1.
My code base is large. I'll list the beginning parts since I think that might be the problem. First
#!/usr/bin/perl BEGIN { push @INC, "/home/neil/perl5/lib/perl5" } use strict; use warnings; use local::lib; use Evolvethinking::Mymodule; use POSIX 'strftime';
And the module.
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-d +d hh:mm' }; has 'timestamp' => ( is => 'ro', isa => 'my_timestamp' );


Carp::Any shows that my typing is working properly by returning an error. However, I wonder why the error was so vague.
Attribute (insert_class) does not pass the type constraint because: No +t a valid class at /home/neil/perl5/lib/perl5/x86_64-linux-thread-mul +ti/Mouse/ line 383, <FH> line 1. Mouse::Util::throw_error('Mouse::Meta::Attribute=HASH(0x161869 +8)', '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/ line 383, <FH> line + 1. Mouse::Util::throw_error('Mouse::Meta::Attribute=HASH(0x161869 +8)', 'Attribute (insert_class) does not pass the type constraint be.. +.', 'data', '192_168_0_151', 'depth', -1) called at ./ 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' );
Also, is there a way to have this typing do something other than exit? I'd really like to to just return none zero.

Neil Watson

In reply to Help with vague Carp error message by neilwatson

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [davido]: Lol, in composing test code for Re: Stupid, yet simple, sort question I managed to fill up /tmp for a moment, causing bash to complain about "pmbash: cannot create temp file for here-document: No space left on device"
    [davido]: hm, sorry, wrong link: Re^3: Perl Program to efficiently process 500000 small files in a Directory (AIX) should be it.

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (2)
    As of 2018-03-18 06:59 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (228 votes). Check out past polls.