![]() |
![]()
| ![]() |
![]()
NAMEApp::Genpass - Quickly and easily create secure passwordsVERSIONversion 2.401SYNOPSISuse App::Genpass; my $genpass = App::Genpass->new(); print $genpass->generate, "\n"; $genpass = App::Genpass->new( readable => 0, length => 20 ); print "$_\n" for $genpass->generate(10); DESCRIPTIONIf you've ever needed to create 10 (or even 10,000) passwords on the fly with varying preferences (lowercase, uppercase, no confusing characters, special characters, minimum length, etc.), you know it can become a pretty pesky task.This module makes it possible to create flexible and secure passwords, quickly and easily. use App::Genpass; my $genpass = App::Genpass->new(); my $single_password = $genpass->generate(1); # returns scalar my @single_password = $genpass->generate(1); # returns array my @multiple_passwords = $genpass->generate(10); # returns array again my $multiple_passwords = $genpass->generate(10); # returns arrayref This distribution includes a program called genpass, which is a command line interface to this module. If you need a program that generates passwords, use genpass. SUBROUTINES/METHODSnewCreates a new instance. It gets a lot of options.new_with_optionsCreates a new instance while reading the command line parameters.parse_optsParses the command line options.configfileAn attribute defining the configuration file that will be used. If one is not provided, it tries to find one on its own. It checks for a ".genpass.yaml" in your home directory (using File::HomeDir), and then for "/etc/genpass.yaml".If one is available, that's what it uses. Otherwise nothing. You must use the "new_with_options" method described above for this. flags These are boolean flags which change the way App::Genpass works.
attributes
character attributes These are the attributes that control the types of characters. One can change which lowercase characters will be used or whether they will be used at all, for example. # only a,b,c,d,e,g will be consdered lowercase and no uppercase at all my $gp = App::Genpass->new( lowercase => [ 'a' .. 'g' ], uppercase => [] );
generateThis method generates the password or passwords.It accepts an optional parameter indicating how many passwords to generate. $gp = App::Genpass->new(); my @passwords = $gp->generate(300); # 300 passwords to go If you do not provide a parameter, it will use the default number of passwords to generate, defined by the attribute number explained above. This method tries to be tricky and DWIM (or rather, DWYM). That is, if you request it to generate only one password and use scalar context ("my $p = $gp->generate(1)"), it will return a single password. However, if you try to generate multiple passwords and use scalar context ("my $p = $gp->generate(30)"), it will return an array reference for the passwords. Generating passwords with list context ("my @p = $gp->generate(...)") will always return a list of the passwords, even if it's a single password. get_config_from_fileReads the configuration file using Config::Any.Shamelessly lifted from MooseX::SimpleConfig. AUTHORSawyer X, "<xsawyerx at cpan.org>"DEPENDENCIESCarpMoo MooX::Types::MooseLike Getopt::Long File::Spec Config::Any File::HomeDir List::AllUtils BUGS AND LIMITATIONSPlease report any bugs or feature requests to "bug-app-genpass at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-Genpass>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORTYou can find documentation for this module with the perldoc command.perldoc App::Genpass You can also look for information at:
AUTHORSawyer X <xsawyerx@cpan.org>COPYRIGHT AND LICENSEThis software is copyright (c) 2011 by Sawyer X.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|