Home  |  Linux  | Mysql  | PHP  | XML
From:David E. Wheeler Date:Mon Aug  4 11:01:05 2008
Subject:Re: [RESEND] Machine-Manipulatable Arguments for Module::Build
On Aug 4, 2008, at 04:14, Shlomi Fish wrote:

>> Um, nothing has to parse Build.PL.
>
> Parse and modify Build.PL

I agree with you: nothing should do that.

> So you agree that I should not edit META.yml directly?

Yes.

> In this case I want
> something machine-readable as input to M::B, which will eventually  
> end up at
> META.yml where the CPAN interfaces can find it.

Why? The META itself is machine-readable.

> Ah. But if I want to make it machine-readable, then I'll need a YAML  
> (or
> whatever) file which will in turn be read by Meta-Build.PL which  
> will run
> Build.PL with all of these command line args. This will add more  
> complexity,
> and will be probelamtic if someone runs Build.PL directly.

You're already talking about adding complexity, and I don't understand  
why.

>> Why?
>
> Because I want to

Um, okay. Suit yourself. That doesn't mean it should be in M::B itself.

>
>>>> Yep, that's what the command-line arguments are for.
>
> Ah. But I need to remember to append them to Build.PL everytime. If  
> it's
> written in a file somewhere under the local directory it would be less
> error-prone.

That's what shell scripts are for. And aliases. Or batch files, if  
that's your thing.

>> But a patch demonstrating what you want would probably be more
>> convincing, in that we could much better understand what it is you  
>> want.
>
> I think I can accomplish that using a sub-class, so that will be my  
> first
> lead. I'll also do it TDD-style, so you can understand what I mean  
> using the
> tests.

As a side note, we really should get some sort of plugin or callback  
architecture into M::B. Maybe I'll work on that after the next  
release. Then we can discourage subclassing.

Anyway, I still don't understand what problem you're trying to solve.  
I understand the solution, but not the problem.

Take tags, for example. As things currently stand, a module author can  
specify keywords in Build.PL, and they will be put into META.yml. Both  
of these files are for the module author to manage, not anyone else.  
So the author uploads the module to CPAN with the keywords in the  
META.yml file, and the code for search.cpan.org or some other site can  
index the META.yml data in its own database, and then, if it wishes,  
provide its own interface for site users to tag distributions. These  
tags would not be added to META.yml.

So the way it works is that the module author puts stuff into  
Build.PL, and M::B generates META.yml based on that. No one other than  
the module author should edit Build.PL or generate META.yml. So who  
else needs to edit a file that determines stuff that goes into  
META.yml? The module author can just use Build.PL, which is easy, but  
I see no need for anyone else to do that.

You, however, it seems, do, otherwise you wouldn't want a machine- 
readable file to feed to Build.PL to affect the output of META.yml. So  
who are these people, and why are they doing this?

IOW, what problem are you trying to solve?

Best,

David

Navigate in group perl.module.build at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants