From 7e948f4248953e135ba9824e15801b313f69c9da Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 20 Jul 2011 22:57:01 +0200 Subject: Fix pwgen usage, release v0.52 --- lib/App/Raps2.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/App/Raps2.pm') diff --git a/lib/App/Raps2.pm b/lib/App/Raps2.pm index 1d18d79..d13aaed 100644 --- a/lib/App/Raps2.pm +++ b/lib/App/Raps2.pm @@ -12,7 +12,7 @@ use File::BaseDir qw(config_home data_home); use File::Path qw(make_path); use File::Slurp qw(slurp write_file); -our $VERSION = '0.51'; +our $VERSION = '0.52'; sub new { my ( $class, %opt ) = @_; @@ -186,7 +186,7 @@ sub generate_password { my ($self) = @_; open( my $pwgen, q{-|}, $self->conf('pwgen_cmd') ) or return; - my $password = <$pwgen>; + my $password = ( split( / /, <$pwgen> ) )[0]; close($pwgen) or cluck("Cannot close pwgen pipe: $!"); chomp $password; @@ -299,7 +299,7 @@ B is the backend for B, a simple commandline password safe. =head1 VERSION -This manual documents App::Raps2 version 0.51 +This manual documents App::Raps2 version 0.52 =head1 METHODS @@ -394,7 +394,7 @@ from the defaults config file. =item $raps2->generate_password() Runs B (as specified in B or the config file) and returns its -first line of output, without the trailing newline. +first word of output, without trailing newlines / whitespaces. =back -- cgit v1.2.3