Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Problem undefining a variable in a loop using a module causing a list to not empty after use of a subroutine

by ikegami (Patriarch)
on Apr 07, 2010 at 06:26 UTC ( [id://833200]=note: print w/replies, xml ) Need Help??


in reply to Problem undefining a variable in a loop using a module causing a list to not empty after use of a subroutine

By the way, use lib doesn't make any sense in a module. Perl can obviously already find the modules if it encounters the line.
  • Comment on Re: Problem undefining a variable in a loop using a module causing a list to not empty after use of a subroutine
  • Download Code

Replies are listed 'Best First'.
Re^2: Problem undefining a variable in a loop using a module causing a list to not empty after use of a subroutine
by almut (Canon) on Apr 07, 2010 at 06:59 UTC
    use lib doesn't make any sense in a module.

    Why not?  Would make sense, for example, if the module uses other modules from (other) non-standard library locations...

    (I don't know where the modules reside in the OP's case, so I can't tell whether it makes sense here, though.)

      FWIW, I think use lib is for programs
Re^2: Problem undefining a variable in a loop using a module causing a list to not empty after use of a subroutine
by Lady_Aleena (Priest) on Apr 07, 2010 at 06:56 UTC

    Actually, it can't since I am not using the standard module libraries for my really really site specific modules. I am storing them elsewhere. I have gone without the use lib line when using modules in the same directory, and I get all kinds of errors. There is no chance that I can get any provider to add that folder to the module library, as far as I know. And honestly, who would want them other than me?

    Have a nice day!
    Lady Aleena

      The module in which you use use lib is in that non-standard location, right? So why do you say you need to tell Perl where to look.

      You just need the use lib in the script. The use lib in the module is redundant.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found