in reply to Re: ExtUtils::Command touch (Path::Tiny , Shell::Command )
in thread ExtUtils::Command touch
Oh well not going to be a big deal to add it Thanks!#!/usr/bin/perl package Debug; use strict ; use warnings ; &test_pt; sub test_ex { use ExtUtils::Command; my ( $path ) = @_ ; my ($file, $count); my @files = ('test.txt','test-1.txt'); foreach $file (@files) { if ($path) {$file = "$path/$file"} $count++; print "$file\n"; ExtUtils::Command::touch $file || ($count--, print "$file not update +d\n") ; } print "$count files updated\n"; } sub test_pt { use Path::Tiny qw/ path /; my ( $path ) = @_ ; my ($file, $count); my @files = ('test.txt','test-1.txt'); foreach $file (@files) { if ($path) {$file = "$path/$file"} $count++; print "$file\n"; path( $file )->touchpath || ($count--, print "$file not updated\n") + ; } print "$count files updated\n"; } 1;
|
|---|