Re: [Module-build-general] Warning on shebang/extending M::B
Status: Beta
Brought to you by:
kwilliams
|
From: Ken Y. C. <kc...@lo...> - 2003-09-11 20:48:52
|
On Wed, 10 Sep 2003, Dave Rolsky wrote:
> Date: Wed, 10 Sep 2003 16:50:48 -0500 (CDT)
> From: Dave Rolsky <au...@ur...>
> To: mod...@li...
> Subject: Re: [Module-build-general] Warning on shebang/extending M::B
>
> On Wed, 10 Sep 2003, Ken Y. Clark wrote:
>
> > practices when it comes to what I want to do. Specifically, I want to
> > copy HTML templates, an HTML stylesheet, and a configuration file to
> > the directories the user has set (or the defaults I have in my
> > script). Then I just want to let M::B do it's thing. Something like:
> >
> > sub ACTION_install {
> > my $self = shift;
> > copy_files('templates', $template_dir);
> > copy_files('conf/cmap.conf', $conf_dir);
> > copy_files('conf/cmap.css', $ss_dir);
> > $self->SUPER::ACTION_install;
> > }
> >
> > Does that look reasonable? Any suggestions on the best way to write
> > the "copy_files" part?
>
> Check out the 'copy_if_modified' method. That's what it is there for.
Ah, thanks for that pointer. I glossed over that method.
Any chance to get "copy_if_modified" to also take a "from_dir"
argument and have it glob everything in there (perhaps recursively
grabbing sub-dirs)?
> But use File::Spec in to get 'conf/cmap.conf' for portability!.
Another great tip. Thanks!
ky
|