For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > January 2008 > Re: Obscure baffling "module not exported" error: can someone help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Obscure baffling "module not exported" error: can someone help
Henry Law

2008-01-31, 7:21 pm

attn.steven.kuo@gmail.com wrote:

> First of all, you have a couple of modules that mutually use
> each other, namely:
>
> NFBT::ServerLib and
> NFBT::Utilities::Server
>
> this is generally a bad idea and you should consider refactoring;
> see the discussion here:
>
> http://www.perl.com/pub/a/2000/07/p...html#Mutual_use


Steven, and Mark Clements in another post, thank you very much. Even
the little I knew about how Perl programs actually hurl themselves into
action should have pointed me to the fact that this kind of circular
"use"-ing isn't a good idea. I'll have a go at some refactoring; if
that doesn't work (sounds like intellectual heavy lifting) then I might
resort to using BEGIN blocks or "require".

But one more thing: can you think of a reason why this problem has
suddenly hit? I'm doing a test installation (having written a configure
program to produce a Makefile) on a fresh machine, running FC6 (Perl
5.8.8 but I don't have a perl -v handy), but the code is built on my
development machine, FC5, also Perl 5.8.8, on which it runs perfectly,
circular references notwithstanding. But I'll bash on with the
refactoring anyway.

--

Henry Law Manchester, England
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com