in reply to Re: WWW::ImagesHack
in thread WWW::ImagesHack

Yes thanks. I'll definitely use WWW::Mechanize. Ihad been searching CPAN for stuff like that but couldn't find it (as I had never used it, didn't really know what to look for).

As for the refactoring, yes, this is a good idea, though what I was thinking of was rather dynamic sub creation, something like
foreach(@keylist){ my $key = shift; sub get_$key { #code of the func} push @funcs,\get_$key; }
But if this is possible, then I should return the subs' references so that they aren't destroyed when I loop in the foreach...and then export them all dereferenced...
How about that? Or is it obfuscating the code for peanuts?


P!

Are the monkeys gone yet?

Replies are listed 'Best First'.
Re^3: WWW::ImagesHack
by davidrw (Prior) on Sep 15, 2005 at 20:10 UTC
    i meant to mention AUTOLOAD as another way to do it dymanically ... check out the "AUTOLOAD: Proxy Methods" section in perltoot -- i think it's exactly what you're looking for...