logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: [Module::Build] Re: ModPerl::MB: msg#00203

Subject: Re: [Module::Build] Re: ModPerl::MB

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



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt


<Prev in Thread] Current Thread [Next in Thread>