Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Can't locate object method "se" via package "warnings"

by slugger415 (Monk)
on Mar 05, 2012 at 17:10 UTC ( [id://957929]=perlquestion: print w/replies, xml ) Need Help??

slugger415 has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks, some users are getting this error message when running a script I've written:

Can't locate object method "se" via package "warnings" at C:/Perl/5.14 +.2/lib/threads.pm line 3.

I cannot reproduce this message. Can anyone explain what it means and how to resolve it?

FWIW I have these modules:

require 5.10.0; use open ':encoding(utf8)'; use threads; use threads::shared; use strict; use warnings; use Encode; use Carp; use File::Path; use File::Basename; use File::Spec; use IC_TOC;

IC_TOC.pm is a custom module that also uses strict and warnings.

thanks, Scott

Update: I posted a reply down the chain here but wanted to get it up top too. Hi all, I suspect the problem was something in the user's Path statement that was hijacking the process. She cleaned out her Path, reinstalled Perl and it seems to be working better now. I appreciate the help -- sorry for a false (Perl) alarm.

thanks -- Scott

Replies are listed 'Best First'.
Re: Can't locate object method "se" via package "warnings"
by ikegami (Patriarch) on Mar 05, 2012 at 17:21 UTC

    Can you check c:\perl\5.14.2\lib\threads.pm? It should start with

    package threads; use 5.008; use strict; use warnings;

    But, for some reason, perl thinks the file has se warnings; on line 3.

      The user confirmed her threads.pm has that exact text.

      Again, I can't replicate this on my (Win 7) system. She's on XP if that matters.

      thank you.

        Make sure c:\perl\5.14.2\lib\threads.pm uses Windows line endings (CRLF, not LF).

        (LF should be fine, but I know there's a circumstance in which the use of CRLF is assumed. I can't remember what it was specifically, but it could cause the start of the file to be misindentified.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://957929]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found