Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How do I catch "Can't locate <module>.pm" errors at runtime?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Janine Goldstein  
View profile  
 More options Oct 16 2009, 12:37 pm
Newsgroups: perl.perlfaq.workers
From: jan...@ucar.edu (Janine Goldstein)
Date: Fri, 16 Oct 2009 10:37:20 -0600
Local: Fri, Oct 16 2009 12:37 pm
Subject: How do I catch "Can't locate <module>.pm" errors at runtime?
Hi,

I am a newby to perlfaq. Please let me know if I am emailing the wrong
group. Thanks.

I have some code that uses a Perl module and I would like to catch the error
"Can't locate <module>.pm in @INC" at runtime, give use user an error
message telling them they need to run the code on a different machine,
and exit gracefully.

I have tried:

no warnings FATAL
eval {use <module>}; warn $@ if $@;
BEGIN {$SIG{"__WARN__"} = sub {...};
try {use <module>;} catch {...};

all to no avail. Am I messing up the syntax or is there something more
fundamental going on?

Thanks for any and all help!!!!

Janine


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shlomi Fish  
View profile  
 More options Oct 17 2009, 1:01 pm
Newsgroups: perl.perlfaq.workers
From: shlo...@iglu.org.il (Shlomi Fish)
Date: Sat, 17 Oct 2009 19:01:35 +0200
Local: Sat, Oct 17 2009 1:01 pm
Subject: Re: How do I catch "Can't locate <module>.pm" errors at runtime?
Hi Janine!

I'm sorry to disappoint you, but this is not the appropriate mailing list to
ask for technical help with some Perl code. Instead, it is intended for
working and enhancing the perl F.A.Q., which you are welcome to read here:

http://faq.perl.org/

There's another FAQ (this time for Freenode's #perl channel) here, which may
also prove of interest:

http://perl.net.au/wiki/Freenode_Sharp_Perl_FAQ

A mailing list you are looking for can be found here:

http://perl-begin.org/mailing-lists/

Feel free to still stay subscribed to this list and contribute.

Regards,

        Shlomi Fish

On Friday 16 Oct 2009 18:37:20 Janine Goldstein wrote:

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
The Case for File Swapping - http://shlom.in/file-swap

Chuck Norris read the entire English Wikipedia in 24 hours. Twice.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »