]> iEval git - apache2-authen-passphrase.git/blobdiff - aap-passwd
Fix copyright and license
[apache2-authen-passphrase.git] / aap-passwd
index 68dee6bfd5804429cc13ab1b5a6d407a3190a011..e50f3eadfc7f233adea1fcf112f34499469e939c 100644 (file)
@@ -1,24 +1,27 @@
-#!/usr/bin/perl -wT
-use v5.14;
+#!/usr/bin/perl -T
+use 5.014000;
 use strict;
+use warnings;
+
+our $VERSION = 0.002001;
 
 use Apache2::Authen::Passphrase qw/pwset USER_REGEX/;
 
 use IO::Prompter [qw/-e* -stdio/];
 
-die "Usage: aap-passwd [rootdir] username\n" unless $#ARGV >= 0 && $#ARGV <= 1;
-($Apache2::Authen::Passphrase::rootdir) = (shift =~ /(.*)/) if $#ARGV == 1;
+die "Usage: aap-passwd [rootdir] username\n" if @ARGV == 0 || @ARGV > 2;
+($Apache2::Authen::Passphrase::rootdir) = (shift =~ /(.*)/s) if @ARGV == 2;
 
 my $username = shift;
-die "Invalid username" unless $username =~ USER_REGEX;
-($username) = ($username =~ /(.*)/);
+die "Invalid username\n" unless $username =~ USER_REGEX;
+($username) = ($username =~ /(.*)/s);
 
 my $passwd = prompt 'Enter new Apache2::Authen::Passphrase password: ';
 my $confirm = prompt 'Retype new Apache2::Authen::Passphrase password: ';
 
 die "Sorry, passwords do not match\n" unless $passwd eq $confirm;
 pwset $username, $passwd;
-say "Password updated successfully";
+say 'Password updated successfully'; ## no critic (RequireCheckedSyscalls)
 
 __END__
 
@@ -63,23 +66,11 @@ Marius Gavrilescu C<< <marius@ieval.ro> >>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2013 Marius Gavrilescu
-
-This file is part of fonbotd.
-
-fonbotd is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+Copyright (C) 2013-2015 by Marius Gavrilescu
 
-fonbotd 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 Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with fonbotd.  If not, see <http://www.gnu.org/licenses/>
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself, either Perl version 5.14.2 or,
+at your option, any later version of Perl 5 you may have available.
 
 
 =cut
-
This page took 0.024682 seconds and 4 git commands to generate.