Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: Undefined subroutine &main::func1

by thanos1983 (Parson)
on Jun 28, 2015 at 02:53 UTC ( [id://1132315]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Undefined subroutine &main::func1
in thread Undefined subroutine &main::func1 [SOLVED]

Hello again kcott,

So so tired, here the time is 4:50 am. I am still struggling to understand why is not working. Any way I have updated my code.

I did read Exporter quickly not thoroughly but the code that I am using is taken from Simple Module Tutorial, so I assume it should work straight out of the box.

Again thank you for your time and effort.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^5: Undefined subroutine &main::func1
by kcott (Archbishop) on Jun 28, 2015 at 03:16 UTC
    "So so tired, here the time is 4:50 am. ..."

    Then get some sleep!

    "I did read Exporter quickly not thoroughly ..."

    Well there's a problem! Go and read it, not just glance at it, after you awake and are refreshed.

    "... but the code that I am using is taken from Simple Module Tutorial, ..."

    No, it's not! Look again, after you awake and are refreshed.

    "... so I assume it should work straight out of the box."

    I don't think it would have got Reputation: 315 (no significant downvotes), if it didn't work.

    However, you're not using it "straight out of the box". You've made significant changes to it!

    After you've had some sleep and are refreshed, go through the tutorial code and your code, line by line, and note all the differences.

    Then, the next step will be to make your code look more like the tutorial code. When you've done that, you'll probably find that it works just fine.

    -- Ken

      Hello kcott,

      Well the Simple Module Tutorial works perfectly out of the box. Well I tried also to use the MyModule.pm with my script client.pl and it works perfectly.

      The problem still lies when I am using my module Net::SNTP::Client.pm, For some unknown reason to me it still gives me the same error.

      I have modified the code just as the example in MyModule.pm and I have tested the MyModule.pm and it works perfectly, but when I am applying the same exact code on Net::SNTP::Client.pm and I call it from my client.pl script I keep getting this error:

      Undefined subroutine &main::func1 called at client.pl line 9.

      So at this point I assume that might be because I installed the module and it can not detect the modifications that I am applying. This is only a guess I am not 100% sure if I am correct.

      Seeking for Perl wisdom...on the process of learning...not there...yet!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-25 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found