Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Perl module error

by Vaclav_ (Novice)
on Oct 04, 2013 at 15:07 UTC ( #1056892=note: print w/ replies, xml ) Need Help??


in reply to Re: Perl module error
in thread Perl module error

Same like you:

use Gate88::Bot::Core::KeyManager; $s->{'keyboard'} = Gate88::Bot::Core::KeyManager->new( $s->{'gs'}, $s- +>{'nm'} );
($s is another object) If I comment the use... line it says syntax Ok, so it must be in the module.


Comment on Re^2: Perl module error
Download Code
Replies are listed 'Best First'.
Re^3: Perl module error
by toolic (Bishop) on Oct 04, 2013 at 15:17 UTC
    Maybe there is some problematic whitespace in your .pm file:
    cat -A KeyManager.pm

    You should download the code from your post, just like I did, and paste it into a new file.

      I did what you said, downloaded it and replaced, and it worked! But then when I add my additional code to the file, I get error again: "KeyManager.pm" did not return a true value". So what is this whitespace problem? White spaces should be ignored by perl, and I don't have new line after 1; Is it about the newline character? I'm using Notepad++ on windows.

        So what is this whitespace problem?

        do like toolic told you and find out using cat -A file

        $ cat -A foo sub ^Mfoo ^M{ 1 ^M}^M
        ^M is \r aka CR

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1056892]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2015-07-29 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls