[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exclude patterns
On 06/29/2014 12:30, Daniel Staal wrote:
--As of June 29, 2014 6:04:01 AM -0700, jerry is alleged to have
said:
Fair warning: I am not an expert Perl programmer. This thing seems
to
work, but YMMV and
if your computer blows up into coruscating sparks, it's not my fault
--As for the rest, it is mine.
Could use a bit of a cleanup - there is evidence of your development
process in the code - but it's not horrible. ;)
*** You're very kind.
The one major thing is that you never close your big if statement
(`if ( -e $excludes_filename )`). I think that means this will work
fine until the first time you run it on a directory without an
excludes file - when it will silently do nothing.
*** Actually, that "if" is closed, just above the bottom foreach.
If there is no excludes file, it simply executes tarsnap, passing
it all the original ARGV stuff.
However, I do notice that I repeated the "delete leading and
trailing spaces" stuff.
Also, one of the regexes looks a little bogus. I swear, sometimes I
look at
stuff I wrote and wonder how it worked at all. :)
- Jerry