Jo was talking on IRC today and made me think about packages. Imagine
if you will the following situation ...

        you have Country.pm which implements the general functions
         with default implementation for each country

        you have special cases such as Country::France which say for
         example they do things differently

        so you want to do use Country::Germany and just use the
         default subs from Country.pm in a pretty much trivial
         class

now you would have to implement these trivial 4 line packages for each
trivial country. i wondered how you could do it better. i'm sure
this is a feature that is in CPAN/Perl somewhere, but just in case it
isn't please witness Muse.pm a 5 minute (and probably buggy)
implementation of muse (magic use) that takes care of this problem.

i'm sure its already in CPAN but i havent programmed for ages, so
couldnt be bothered to think about it

Greg

p.s. i dont recommend ever using this code in production


-- 
Greg McCarroll                          http://www.mccarroll.uklinux.net

Country.pm

Muse.pm

test.pl

Reply via email to