In your Makefile.pl file, you can add dependencies like so:
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'Foo::Bar',
'VERSION_FROM' => 'Bar.pm',
'PREREQ_PM' => { Class::MethodMaker => 1.06 },
);
If the user is using the CPAN shell, it will prompt them
if they want to queue and install Class::MethodMaker. I am
sure that CPANPLUS will do this as well, but i have not
tested it myself.
Class::MethodMaker is, IMHO, a wonderful module - but it is
not the fastest way to use classes (for a processor,
that is). Depending upon the number of classes you have to
create, you might just want to go ahead and explicitly
write the accessor methods yourself, if you think you won't
have to do a lot of maintenance (yeah, right).
As for your second question, i know of no modules that will
output the class as a text file ... sounds like a really
good idea though. I like it. I recommend you check out the
POOP
mailing list. miyagawa is an active particpant, he might
have more info for you.
jeffa
L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)
| [reply] [d/l] |
One of the monks here has written a book that covers a great deal of information on this particular subject, and he mentions the Class::MethodMaker module as well.
TStanley
--------
Never underestimate the power of very stupid people in large groups -- Anonymous | [reply] |