App-genpw

 view release on metacpan or  search on metacpan

script/genpw  view on Meta::CPAN

If no pattern is supplied, will generate random alphanum characters with this maximum length.

=item B<--min-len>=I<s>

If no pattern is supplied, will generate random alphanum characters with this minimum length.

=item B<--num>=I<s>, B<-n>

Default value:

 1

Can also be specified as the 1st command-line argument.

=item B<--pattern>=I<s@>, B<-p>

Pattern(s) to use.

CONVERSION (C<%P>). A pattern is string that is roughly similar to a printf
pattern:

 %P

where C<P> is certain letter signifying a conversion. This will be replaced with
some other string according to the conversion. An example is the C<%h> conversion
which will be replaced with hexdigit.

LENGTH (C<%NP>). A non-negative integer (C<N>) can be specified before the
conversion to signify desired length, for example, C<%4w> will return a random
word of length 4.

MINIMUM AND MAXIMUM LENGTH (C<%M$NP>). If two non-negative integers separated by
C<$> is specified before the conversion, this specify desired minimum and maximum
length. For example, C<%4$10h> will be replaced with between 4 and 10 hexdigits.

ARGUMENT AND FILTERS (C<%(arg)P>, C<%(arg)(filter1)(...)P>). Finally, an argument
followed by zero or more filters can be specified (before the lengths) and
before the conversion. For example, C<%(wordlist:ID::KBBI)w> will be replaced by
a random word from the wordlist L<WordList::ID::KBBI>. Another example,
C<%()(Str::uc)4$10h> will be replaced by between 4-10 uppercase hexdigits, and
C<%(arraydata:Sample::DeNiro)(Str::underscore_non_latin_alphanums)(Str::lc)(Str::ucfirst)w>
will be replaced with a random movie title of Robert De Niro, where symbols are
replaced with underscore then the string will be converted into lowercase and
the first character uppercased, e.g. C<Dear_america_letters_home_from_vietnam>.

Anything else will be left as-is.

Available conversions:

 %l   Random Latin letter (A-Z, a-z)
 %d   Random digit (0-9)
 %h   Random hexdigit (0-9a-f in lowercase [default] or 0-9A-F in uppercase).
      Known arguments:
      - "u" (to use the uppercase instead of the default lowercase digits)
 %a   Random letter/digit (Alphanum) (A-Z, a-z, 0-9; combination of %l and %d)
 %s   Random ASCII symbol, e.g. "-" (dash), "_" (underscore), etc.
 %x   Random letter/digit/ASCII symbol (combination of %a and %s)
 %m   Base64 character (A-Z, a-z, 0-9, +, /)
 %b   Base58 character (A-Z, a-z, 0-9 minus IOl0)
 %B   Base56 character (A-Z, a-z, 0-9 minus IOol01)
 %%   A literal percent sign
 %w   Random word. Known arguments:
      - "stdin:" (for getting the words from stdin, the default)
      - "wordlist:NAME" (for getting the words from a L<WordList> module)
      - "arraydata:NAME" (for getting the words from an L<ArrayData> module, the
        Role::TinyCommons::Collection::PickItems::RandomPos will be applied).

Filter names are modules in the C<Data::Sah::Filter::perl::> namespace (without
the prefix). To list available filters, you can use L<pmlist> or
L<list-sah-filter-rule-modules>:

 % pmlist 'Data::Sah::Filter::perl::**'
 % list-sah-filter-rule-modules --perl


Can be specified multiple times.

=item B<--patterns-json>=I<s>

Pattern(s) to use (JSON-encoded).

See C<--pattern>.

=item B<-L>

Shortcut for --case=lower.

See C<--case>.

=item B<-U>

Shortcut for --case=upper.

See C<--case>.

=back

=head2 Configuration options

=over

=item B<--config-path>=I<s>, B<-c>

Set path to configuration file.

Can actually be specified multiple times to instruct application to read from
multiple configuration files (and merge them).


=item B<--config-profile>=I<s>, B<-P>

Set configuration profile to use.

A single configuration file can contain profiles, i.e. alternative sets of
values that can be selected. For example:

 [profile=dev]
 username=foo
 pass=beaver
 
 [profile=production]



( run in 2.660 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )