Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old August 1st, 2008, 06:03 PM
pawanrpandey's Avatar
Newbie
 
Join Date: Feb 2007
Location: Bangalore
Posts: 11
Default .pm did not return a true value at

Hi All,

Can any one please explain the logic behind this error and impact on putting 1; at the end of module? As you know this error "****.pm did not return a true value at****" comes when we use call another Perl module from a Perl file, but this error goes if we put 1; at the end of Perl file. Does it a right approach or some other way is there? Because same set of scripts does not give this error, but after creating one extra module from existing one, this error is coming. Even after commenting out the additional module this error is not stopping.

So:
1. Is it best way to put 1; at the end of Perl file to stop this error?
2. Does it not make Script slower?
3. Is this error due to some other reason?

Please give your valuable inputs in this....

Thanks,
Pawan
Reply
  #2  
Old August 1st, 2008, 08:59 PM
KevinADC's Avatar
Expert
 
Join Date: Jan 2007
Posts: 3,662
Default

This thread I found on another website explains it very well:

why is the '1;' necessary at the end of perl modules
Reply
  #3  
Old August 2nd, 2008, 12:14 AM
pawanrpandey's Avatar
Newbie
 
Join Date: Feb 2007
Location: Bangalore
Posts: 11
Default

Thank you very much Kevin!!!
It it answers my questions.

Regards,
Pawan
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles