Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Undefined subroutine errors

by GrandFather (Saint)
on Oct 25, 2005 at 23:47 UTC ( [id://502902]=note: print w/replies, xml ) Need Help??


in reply to Re: Undefined subroutine errors
in thread Undefined subroutine errors

I'm sure no sensible person would flame you for suggesting that OP's base problem looks like a design issue. Given that OP seems to have control over all the code involved OP's best option may be to refactor the code to remove the circular dependencies that are implied, or at least move the circular code into a common module so that that nastyness doesn't leak out to pollute other code.

However, assuming that the modules are currently being "used", requiring may fix the issue. OP should take a look at Using a module more than once which has some interesting and pertinent replys.


Perl is Huffman encoded by design.

Replies are listed 'Best First'.
Re^3: Undefined subroutine errors
by ioannis (Abbot) on Oct 26, 2005 at 00:44 UTC

    Although uncommon, the intentions of OP might not necessary be a design flaw. His situation is similar to C code when we export symbols, not from the library to main, but from plugin to other plugins using the RTLD_GLOBAL with the 2nd parameter to dlopen(), so plugins can have access to the symbols of one another.

    OP has advanced an interesting problem. My efforts so far reveal that the problem is trivially solved by calling the functions with their full package names. It is the import mechanism of Export that fails to make things more convenient and allow us to import all symbols to both namespaces at once.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-19 14:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found