Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Help with vague Carp error message

by tobyink (Abbot)
on Sep 28, 2012 at 06:28 UTC ( #996117=note: print w/replies, xml ) Need Help??

in reply to Help with vague Carp error message

What version of Carp do you have installed? If I recall correctly, Moose needs a fairly recent version but until recently didn't indicate so properly.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^2: Help with vague Carp error message
by neilwatson (Priest) on Sep 28, 2012 at 11:01 UTC

      You might have 1.26 installed somewhere, but I believe Perl is finding and using an older version. The longmess_real and shortmess_real subs were purged a few years ago, in the 1.1x series IIRC.

      Basically the way they were defined/used was that the (long|short)mess_real functions were defined inside Carp/, and were called from itself. In recent versions Carp/ is not much more than an empty file, and doesn't call (long|short)mess_real at all.

      So what I'm assuming is that Perl is finding an old version of (which calls longmess_real) but a new version of Carp/ (which does not define longmess_real).

      perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
        Yep, you are right. I change my BEGIN block to use unshift to make my custom libs load first.
        BEGIN { unshift @INC, "/home/neil/perl5/lib/perl5" }

        Neil Watson

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996117]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2018-04-23 10:31 GMT
Find Nodes?
    Voting Booth?