On Mon, Nov 03, 2003 at 10:06:22AM +0000, Tim Bunce wrote:
> On Sun, Nov 02, 2003 at 03:35:30PM -0800, Michael G Schwern wrote:
> > On Sun, Nov 02, 2003 at 10:12:55PM +0000, Tim Bunce wrote:
> > > Sounds good. But doesn't MakeMaker have some pre-canned "compare and
> > > move only if different" logic that might be useful here?
> > 
> > Good idea.  manicopy() uses cp_if_diff().  I can use File::Compare.  I've
> > made sure its untouched if there's no change.
> > 
> >         -$(NOECHO) $(PERLRUN) -MExtUtils::Command -MFile::Compare -e 'compare(@A
> > RGV) != 0 ? (mv or warn "Cannot move META_new.yml to META.yml\n") : unlink(shift
> > );' META_new.yml META.yml
> 
> No args to mv?

Nope.  ExtUtils::Command functions read from @ARGV.

> No $! in warning message?

mv() uses File::Copy::move() which... does set $!.  Ok then. 

> If length is the issue then perhaps: warn "Can't move @ARGV: $!\n";

Unfortunately, much of the ExtUtils::Command functions pop and shift
@ARGV.  Do I really want to go through the hassle of fixing this?  *sigh*
No, but I will.


-- 
Michael G Schwern        [EMAIL PROTECTED]  http://www.pobox.com/~schwern/
WOOHOO!  I'm going to Disneyland!
        http://www.goats.com/archive/980805.html

Reply via email to