Thanks for your input, I beleive I may have not been clear aboutthe goal
and apologize if it confused you.


Lee,

It's generally best to provide as real-world an example as possible
when asking for help on this list.  Code doesn't confuse things--or
people--around here.  We all look at the code you send and comment on
it.

Are you even serious? I sent the exact code that reproduced the problem. You said you didn't have time to run it which is fine,
but it was there :)


I still have to say, though, that you're not getting the most out of
your modules here.  If you find yourself needing the same thing thing

I think you're wrong, I beleive I'm getting the most out of it :)

in two different places--that is, you're using Digest::MD5 in a

nope just need it in one place, again I think you misunderstand the idea. that you said something about me never even calling import() showed you need a better grasp before you can disect it :)


module, and then exporting Digest::MD5 routines directly into main as
well--you're not being as efficient as you can.  Either calculate all

Only if the caller requests it (IE @EXPORT_OK not @EXPORT) and its plenty efficient.


so you can:

use Parent::Subclass qw(func parent_func);

insead of

use Parent qw(parent_func);
use Parent::Subclass qw(func);

if you dont want the parent's just:

use Parent::Subclass qw(func);

and nothing is done with it...

you checksums in main, or claculate them all in your module.  The
whole idea of modules is to increase maintainability and decrease
complexity by allowing you to segregate functionality.  Here, you're
scattering, and perhaps dublicating, functionality.  And if the next
version of the module changes something important, you have change
both Foo.pm::import and any place you call md5_base64 in main.

I could achieve the above 2 ways:

1) the way I was looking for which passes imports it doesn't have to the Parent->import mehtod = no maintenance due to changes in the Parent (IE adding functions, removing functions)

2) the first way you suggested which I had already mentioend I wanted to avoid, because I'd have to maintain each funstion whwnever the Parnet changed , at that point it would be to lame to do so much work for but #1 = no work and it works great!

I think you misunderstand completely what I'm trying to do. The example code illustrates it nicely.

The solutions other presented allows it to work flawlessly in an efficient and 100% compatiblity/0% maintainablilty manner as I was looking for.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to