Re: [Module-build-general] M::B novice seeks advice re updating Build.PL from v0.17 to v0.18_02
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-06-20 19:30:05
|
Hi Andrew,
Sorry it's taken a while to get back to you, I've been ruminating on
what a proper solution would look like. I think I may have said
previously that putting those files under pm_files would be the way to
go, but I think I have to retract that statement. =( Those files
aren't actually .pm files, and calling them .pm files will mean that
we'll scan them for packages and so on.
I think what you want to do is add an additional installation object
type called 'eye', whose default installation directory is the same as
the pm_files default. I've tried to make the installation map
extensible, but at this point I'm not sure there's enough API to
actually do the extending.
-Ken
On Monday, June 9, 2003, at 04:00 AM, Andrew Savige wrote:
> This is my current Build.PL, the idea being to essentially to treat
> files with a '.eye' suffix the same as those with a '.pm' suffix.
>
> use Module::Build;
> my $class = Module::Build->subclass(
> class => 'My::Builder',
> code => q{
> sub find_pm_files {
> my $self = shift;
> $self->{properties}{pm_files} ||
> $self->rscan_dir('lib', qr{\.(?:eye|pm)$});
> }
> }
> );
> my $m = $class->new(
> module_name => 'Acme::EyeDrops',
> license => 'perl',
> requires => { perl => '5.005' },
> build_requires => { 'Module::Build' => 0.17 }
> );
> $m->create_build_script;
>
> This no longer works in M::B v0.18_02, failing on "Perl Build" with:
> Can't coerce array into hash at G:\Perl\site\lib/Module/Build/Base.pm
> line 894.
>
> Should I update the find_pm_files function above or use the new
> pm_files attribute?
>
> Is this correct use of the pm_files attribute?
> pm_files => { 'lib/Acme/EyeDrops.pm' => 'lib/Acme/EyeDrops.pm',
> 'lib/Acme/camel.eye' => 'lib/Acme/camel.eye',
> # ... and so on
> }
> Do I have to explicitly list every file or is there some shorthand
> to say "treat .eye files the same as .pm files"?
>
> /-\
>
>
> http://mobile.yahoo.com.au - Yahoo! Mobile
> - Check & compose your email via SMS on your Telstra or Vodafone
> mobile.
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The
> best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> _______________________________________________
> Module-build-general mailing list
> Mod...@li...
> https://lists.sourceforge.net/lists/listinfo/module-build-general
>
-Ken
|