X-Git-Url: https://git.jankratochvil.net/?p=macros.git;a=blobdiff_plain;f=AutoGen.pm;h=796733ed6c5593f7b263c489f1f2318c20bf2b49;hp=45f6d7e34fb4a7b3fe297105509863e0b845e177;hb=be11781b7d5174124c299671ed0413bd9b0e06cf;hpb=b2f7664779840eca0c314a4cd035e6af7c500bf9 diff --git a/AutoGen.pm b/AutoGen.pm index 45f6d7e..796733e 100644 --- a/AutoGen.pm +++ b/AutoGen.pm @@ -39,7 +39,7 @@ BEGIN { use File::Touch; # &touch use POSIX qw(WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG WIFSTOPPED WSTOPSIG); HERE - eval "$_\n; 1;" or push @missing,(/^\s*use\s+([^\s;]+)/)[0]; + eval "$_\n; 1;" or push @missing,(/^\s*use\s+([^ ;]+)/)[0]; } die "You are missing some modules - install them by:\n" ."\tperl -MCPAN -e 'install qw(".join(" ",@missing).")'\n" @@ -120,6 +120,8 @@ my(@files)=@_; my $nocheck=shift @files if $files[0] eq "nocheck"; my $dest=pop @files; + # expand pattern to properly match © resulting filenames count + @files=map({ glob $_; } @files); @files==copy @files,$dest or $nocheck or confess "$!"; } @@ -130,6 +132,8 @@ my(@files)=@_; my $nocheck=shift @files if $files[0] eq "nocheck"; my $flag=shift @files if ref $files[0]; + # expand pattern to properly match &remove resulting filenames count + @files=map({ glob $_; } @files); @files==remove((!$flag ? () : $flag),@files) or $nocheck or confess "$!"; }