On Mon 22 Sep 2008, Ken Williams wrote:
> >> Override create_readme() I think.
> >
> > That was actually do_create_readme. However, in my case it was
> > easier to override _main_docfile.
>
> But _main_docfile() is a private undocumented method, which can (and
> very very likely will) change or disappear in future releases of
> M::B. It's fine with me if you override it, but be aware that you're
> way into unsupported-land.

Well, my initial goal was quite trivial. I have a script that creates a 
README that is called during "make dist". My first thought was surely 
the author of M::B would have thought of that and implemented it so 
that one can pass a boolean flag as argument to create_readme or a 
subroutine that will be called in due course. That is how I would have 
done it. Then I found out somehow that I can subclass M::B and override 
ACTION_distdir. Michael suggested it would be better to override 
create_readme. Now I had to look at the code. create_readme is 
documented as "autogenerated accessor" whatever that means. There I 
found that it's not create_readme what he meant to override but 
do_create_readme, a function that is also not documented. How do you 
distinguish between private and public method? Is every undocumented 
method private or every method the name of which starts with an 
underscore?

I understand the argument why MakeMaker is bad. But it has worked for 
many years now. How do you expect to build a greater user base if it's 
so complicated to do simple things in M::B? As a module author I want 
to concentrate on the module not on some Build.PL or Makefile.PL. That 
should just work. M::B may be much better than MM but it has a steep 
learning curve if one wants to do something just slightly off the road.

By the way, you haven't answered my initial question. What is 
the "right" way to do that in M::B?

On Fri 19 Sep 2008, Torsten Foertsch wrote:
>     * use gzip -9f instead of simple gzip
>     * create a README file during ./Build dist using the mk_README.sh
>       script and
>     * add the equivalent of a make target to create an RPM

So I am with David here. If a private method is useful for the public 
make it a public one.

Torsten

--
Need professional mod_perl support?
Just hire me: [EMAIL PROTECTED]

Reply via email to