From 9baf68da78578cd1ea485b7472ca70a24333d212 Mon Sep 17 00:00:00 2001 From: Ian Beckwith Date: Sun, 19 Sep 2010 19:20:43 +0100 Subject: [PATCH] updated stubs to latest perlstub --- bin/id3fs | 51 +++++++++++++++++++-------------------------------- sbin/id3fsd | 51 +++++++++++++++++++-------------------------------- 2 files changed, 38 insertions(+), 64 deletions(-) mode change 100644 => 100755 bin/id3fs mode change 100644 => 100755 sbin/id3fsd diff --git a/bin/id3fs b/bin/id3fs old mode 100644 new mode 100755 index 6260eb9..31a480f --- a/bin/id3fs +++ b/bin/id3fs @@ -3,33 +3,21 @@ # use strict; +use Getopt::Long qw(Configure); use vars qw($me); $me=($0=~/(?:.*\/)?(.*)/)[0]; my $verbose=0; -my $doneargs=0; -my $donesomething=0; +my $help=0; -while($_=shift) -{ - if(/^-/ && !$doneargs) - { - if (/-v/) { $verbose=1; } - elsif(/-q/) { $verbose=0; } - elsif(/--/) { $doneargs=1; } - elsif(/-h/) { usage(); } - else { usage(); } - next; - } - $donesomething=1; - my $file=$_; -} - -unless($donesomething) -{ - usage(); -} +Configure(qw(bundling no_ignore_case)); +my $optret=GetOptions( + "verbose|v" => \$verbose, + "quiet|q" => sub { $verbose=0; }, + "help|h" => \$help, + ); +usage() if(!@ARGV || !$optret || $help); sub usage { @@ -95,24 +83,23 @@ Ian Beckwith The latest version can be found at: -B +B =head1 COPYRIGHT -Copyright 2008 Ian Beckwith +Copyright 2010 Ian Beckwith -This program is free software; you can redistribute it and/or modify +This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +along with this program. If not, see . =cut diff --git a/sbin/id3fsd b/sbin/id3fsd old mode 100644 new mode 100755 index 6260eb9..31a480f --- a/sbin/id3fsd +++ b/sbin/id3fsd @@ -3,33 +3,21 @@ # use strict; +use Getopt::Long qw(Configure); use vars qw($me); $me=($0=~/(?:.*\/)?(.*)/)[0]; my $verbose=0; -my $doneargs=0; -my $donesomething=0; +my $help=0; -while($_=shift) -{ - if(/^-/ && !$doneargs) - { - if (/-v/) { $verbose=1; } - elsif(/-q/) { $verbose=0; } - elsif(/--/) { $doneargs=1; } - elsif(/-h/) { usage(); } - else { usage(); } - next; - } - $donesomething=1; - my $file=$_; -} - -unless($donesomething) -{ - usage(); -} +Configure(qw(bundling no_ignore_case)); +my $optret=GetOptions( + "verbose|v" => \$verbose, + "quiet|q" => sub { $verbose=0; }, + "help|h" => \$help, + ); +usage() if(!@ARGV || !$optret || $help); sub usage { @@ -95,24 +83,23 @@ Ian Beckwith The latest version can be found at: -B +B =head1 COPYRIGHT -Copyright 2008 Ian Beckwith +Copyright 2010 Ian Beckwith -This program is free software; you can redistribute it and/or modify +This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +along with this program. If not, see . =cut -- 2.11.0