bsb has asked for the wisdom of the Perl Monks concerning the following question:

I want to expand tabs to spaces for distribution but keep the tabs on my local copy.

MakeMaker had the "dist" option which could do the following:

dist => { # expand my tabs to 4 PREOP => "(cd \$(DISTVNAME); \\ perl -MExtUtils::Manifest=maniread \\ -pi -e 'BEGIN{\@ARGV=keys \%{maniread()}; } \\ s/\\t/ /g' \\ )" },
Is there an equivalent hook in Module::Build?
When subclassing, how do you call the parent's method?
(Does it have the ACTION_ prefix?)

Brad

Replies are listed 'Best First'.
Re: Module::Build "dist" hooks
by adrianh (Chancellor) on May 17, 2004 at 13:24 UTC
    Is there an equivalent hook in Module::Build?

    Yup. You should be able to just override ACTION_distdir in your subclass something like (untested):

    sub ACTION_distdir { my $self = shift; $self->SUPER::ACTION_distdir; # do default stuff ... do tabs2spaces to files in $self->dist_dir; ... }