Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: A lil module creation advice

by greywolf (Priest)
on Apr 20, 2002 at 11:58 UTC ( [id://160794]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to A lil module creation advice

Is your module failing by being run or failing at compile time?

Every module that is 'used' must compile properly or the entire program will fail before it is run.

'use strict' will tell you exactly where the program is failing. Sending some debugging to the screen will tell you how much of the program is being run before failing.

mr greywolf

Replies are listed 'Best First'.
Re: Re: A lil module creation advice
by snafu (Chaplain) on Apr 20, 2002 at 22:56 UTC
    Well. This is a good question that I overlooked making clear when I started this thread.

    The program I am writing compiles just fine by itself. It even runs at runtime but the fact that my subs get executed at runtime when they should only be run when called is what's causing the whole script to fail.

    _ _ _ _ _ _ _ _ _ _
    - Jim
    Insert clever comment here...

Re: Re: A lil module creation advice
by snafu (Chaplain) on Apr 22, 2002 at 13:05 UTC
    Hmm. I thought I submitted a reply to this one already but I must have overlooked the submit button a few days. Anyhoo, just so everyone knows...

    I was using strict; as I always do, religiously. I learned my lesson on that one way back at the beginning of my Perl coding days. This suggestion from greywolf, btw, is always an excellent suggestion, nay, rule!

    The script in question was compiling fine by itself.

    Thanks for the input everyone. I just needed to make those two points clear so that at least people knew I wasn't a total tard :)

    _ _ _ _ _ _ _ _ _ _
    - Jim
    Insert clever comment here...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://160794]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.