perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Williams" <...@mathforum.org>
Subject Re: [Module::Build] Re: ModPerl::MB
Date Thu, 30 Dec 2004 13:35:01 GMT

On Dec 29, 2004, at 10:20 PM, David Wheeler wrote:

> I think, looking at the code, that all you need to do is override the 
> find_pm_files method like this:
>
>   sub find_pm_files {
>       my $files = shift->SUPER::find_pm_files;
>       for my $file (keys %$files) {
>           $files{$file} = File::Spec->catfile('Apache2', $file);
>       }
>       return $files;
>   }

Yup, that's right, except s/\$file\)/\$files{\$file}\)/.  Actually, it 
could just be:

   sub find_pm_files {
       my $files = shift->SUPER::find_pm_files;
       for my $file (values %$files) {
           $file = File::Spec->catfile('Apache2', $file);
       }
       return $files;
   }

except I think some versions of perl don't let you change hash values 
like that.

The stuff I showed was what you can do without subclassing M::B.  If 
you don't mind subclassing, then the above is the way to go.

  -Ken


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message