Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by slugger415 (Scribe)
on Mar 05, 2012 at 17:10 UTC ( #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 (Pope) 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
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? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2016-06-27 02:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (335 votes). Check out past polls.