Thread: [Module-build-general] Re: [PATCH] Build handles .PL files in bin/
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-03-24 14:51:22
|
On Sunday, March 23, 2003, at 03:24 PM, Casey West wrote: > I'm in need of having Module::Build handle .PL files in bin/. So the > patch below allows this, but we should probably be able to give a list > of directories under which .PL files will be built. But as for > defaults, lib/ and bin/ are most logical. At this point, there is nothing special about a bin/ directory. Are you using that as a directory of scripts? I think it's a good idea to have an argument to specify where .PL files are located, but I'd probably want the default to be just lib/ . What is the MakeMaker procedure on this? -Ken |
|
From: Casey W. <ca...@ge...> - 2003-03-24 15:24:03
|
It was Monday, March 24, 2003 when Ken Williams took the soap box, saying: : : On Sunday, March 23, 2003, at 03:24 PM, Casey West wrote: : : >I'm in need of having Module::Build handle .PL files in bin/. So the : >patch below allows this, but we should probably be able to give a list : >of directories under which .PL files will be built. But as for : >defaults, lib/ and bin/ are most logical. : : At this point, there is nothing special about a bin/ directory. Are : you using that as a directory of scripts? Yes. My example is an MTA with libraries which are installed, and the actual MTA program installed (and built) at the same time. : I think it's a good idea to have an argument to specify where .PL files : are located, but I'd probably want the default to be just lib/ . : : What is the MakeMaker procedure on this? MakeMaker doesn't handle built scripts. You have to do it yourself, by putting something like the following in your Makefile.PL: system($^X, 'bin/poest.PL'); What I really think should happen, is anything in PL_files should be run, reguardless of the directory. That would solve the problem, I would say. Casey West -- Shooting yourself in the foot with AMIGA-DOS The gun works pretty well, except that few people use one and it's impossible to find bullets. |
|
From: David W. <da...@ki...> - 2003-03-24 15:59:58
|
On Mon, 24 Mar 2003, Casey West wrote:
> MakeMaker doesn't handle built scripts. You have to do it yourself,
> by putting something like the following in your Makefile.PL:
>
> system($^X, 'bin/poest.PL');
>
> What I really think should happen, is anything in PL_files should be
> run, reguardless of the directory. That would solve the problem, I
> would say.
Maybe I don't properly understand what you're trying to do, but MM does
build scripts for you. I use it to install the activitymail script like
this:
WriteMakefile(
NAME => 'activitymail',
VERSION_FROM => 'bin/activitymail',
PREREQ_PM => {'Getopt::Std' => 0,
'File::Basename' => 0
},
EXE_FILES => ['bin/activitymail'],
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'bin/activitymail', # retrieve abstract from module
AUTHOR => 'David Wheeler <da...@wh...>') : ()),
);
Check it out here:
http://search.cpan.org/src/DWHEELER/activitymail-1.04/
Regards,
David
--
David Wheeler AIM: dwTheory
da...@ki... ICQ: 15726394
Yahoo!: dew7e
Jabber: Th...@ja...
Kineticode. Settiong knowledge in motion.[sm]
|
|
From: Ken W. <ke...@ma...> - 2003-03-24 16:09:48
|
On Monday, March 24, 2003, at 10:00 AM, David Wheeler wrote: > On Mon, 24 Mar 2003, Casey West wrote: > >> MakeMaker doesn't handle built scripts. You have to do it yourself, >> by putting something like the following in your Makefile.PL: >> >> system($^X, 'bin/poest.PL'); >> >> What I really think should happen, is anything in PL_files should be >> run, reguardless of the directory. That would solve the problem, I >> would say. > > Maybe I don't properly understand what you're trying to do, but MM does > build scripts for you. We're talking about the automatic build-time running of programs like scripts/foo.PL , which usually results in an output file like scripts/foo . The fundamental issues here are about these .PL files, not really about scripts. For instance, .PL files could also be things like lib/Foo/Bar/Baz.pm.PL , which would generate lib/Foo/Bar/Baz.pm . Installing scripts themselves is something that MM and M::B both already do. -Ken |
|
From: Casey W. <ca...@ge...> - 2003-03-24 16:14:21
|
It was Monday, March 24, 2003 when Ken Williams took the soap box, saying: : : On Monday, March 24, 2003, at 10:00 AM, David Wheeler wrote: : : >On Mon, 24 Mar 2003, Casey West wrote: : > : >>MakeMaker doesn't handle built scripts. You have to do it yourself, : >>by putting something like the following in your Makefile.PL: : >> : >> system($^X, 'bin/poest.PL'); : >> : >>What I really think should happen, is anything in PL_files should be : >>run, reguardless of the directory. That would solve the problem, I : >>would say. : > : >Maybe I don't properly understand what you're trying to do, but MM does : >build scripts for you. : : We're talking about the automatic build-time running of programs like : scripts/foo.PL , which usually results in an output file like : scripts/foo . The fundamental issues here are about these .PL files, : not really about scripts. For instance, .PL files could also be things : like lib/Foo/Bar/Baz.pm.PL , which would generate lib/Foo/Bar/Baz.pm . : : Installing scripts themselves is something that MM and M::B both : already do. Yes, but currently Module::Build will only run .PL files within the lib/ directory. I'm just asking for a nice way to extend that. I feel odd asking, as the module is named Module::Build not Dist::Build or Script::Build or App::Build, but it would be handy. Casey West -- "Please leave your values at the front desk." --In a Paris Hotel Elevator |
|
From: David W. <da...@ki...> - 2003-03-24 16:37:48
|
On Mon, 24 Mar 2003, Ken Williams wrote:
> We're talking about the automatic build-time running of programs like
> scripts/foo.PL , which usually results in an output file like
> scripts/foo . The fundamental issues here are about these .PL files,
> not really about scripts. For instance, .PL files could also be things
> like lib/Foo/Bar/Baz.pm.PL , which would generate lib/Foo/Bar/Baz.pm .
>
> Installing scripts themselves is something that MM and M::B both
> already do.
Oops, sorry. Will read more of the background stuff next time. :-)
David
--
David Wheeler AIM: dwTheory
da...@ki... ICQ: 15726394
Yahoo!: dew7e
Jabber: Th...@ja...
Kineticode. Settiong knowledge in motion.[sm]
|
|
From: <and...@an...> - 2003-03-27 12:10:19
|
>>>>> On Mon, 24 Mar 2003 10:27:31 -0500, Casey West <ca...@ge...> said:
> MakeMaker doesn't handle built scripts. You have to do it yourself,
> by putting something like the following in your Makefile.PL:
> system($^X, 'bin/poest.PL');
MakeMaker handles file.PL in the toplevel directory per default and
somedir/file.PL with the PL_FILES parameter, e.g.
PL_FILES => { "topfile.PL" => "topfile",
"directory/otherfile.PL" => "directory/otherfile" },
You can combine that with
EXE_FILES => [qw(topfile directory/otherfile)],
to get the scripts into blib/script/ too.
--
andreas
|