group.pm
branchfoerste-hhsp
changeset 75 63b7c7fcd0cb
parent 48 36aca6fb0ab8
equal deleted inserted replaced
74:b82a656f784e 75:63b7c7fcd0cb
   301     my %x;
   301     my %x;
   302     @x{@_} = ();
   302     @x{@_} = ();
   303     return keys %x;
   303     return keys %x;
   304 }
   304 }
   305 
   305 
   306 {
       
   307     my @pw;
       
   308 
       
   309     sub _mkpw($) {
       
   310         my $in = $_[0];
       
   311 
       
   312         return $in unless $in and $in eq "{pwgen}";
       
   313 
       
   314         if ( !@pw ) {
       
   315             chomp( @pw = `pwgen 8 10 2>/dev/null|| mkpasswd` );
       
   316             die "pwgen/mkpasswd: $!" if $?;
       
   317         }
       
   318         return shift @pw;
       
   319 
       
   320     }
       
   321 }
       
   322 
       
   323 1;
   306 1;
   324 
   307 
   325 # vim:sts=4 sw=4 aw ai sm nohlsearch:
   308 # vim:sts=4 sw=4 aw ai sm nohlsearch: