App-Genpass-ID
view release on metacpan or search on metacpan
is certain letter signifying a format) will be replaced with some
other string. %NP (where N is a number) will be replaced by a word
of length N, %N$Mw (where N and M is a number) will be replaced by a
word of length between N and M. Anything else will be used as-is.
Available conversions:
%w Random word, all lowercase.
%W Random word, first letter uppercase, the rest lowercase.
%s Random ASCII symbol, e.g. "-" (dash), "_" (underscore), etc.
%d Random digit (0-9).
%% A literal percent sign.
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200
means OK, 4xx caller error, 5xx function error). Second element (msg) is
a string containing error message, or 'OK' if status is 200. Third
element (result) is optional, the actual result. Fourth element (meta)
is called result metadata and is optional, a hash that contains extra
information.
lib/App/Genpass/ID.pm view on Meta::CPAN
A pattern is string that is similar to a printf pattern. %P (where P is certain
letter signifying a format) will be replaced with some other string. %NP (where
N is a number) will be replaced by a word of length N, %N$Mw (where N and M is a
number) will be replaced by a word of length between N and M. Anything else will
be used as-is. Available conversions:
%w Random word, all lowercase.
%W Random word, first letter uppercase, the rest lowercase.
%s Random ASCII symbol, e.g. "-" (dash), "_" (underscore), etc.
%d Random digit (0-9).
%% A literal percent sign.
=back
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code
(200 means OK, 4xx caller error, 5xx function error). Second element
(msg) is a string containing error message, or 'OK' if status is
200. Third element (result) is optional, the actual result. Fourth
element (meta) is called result metadata and is optional, a hash
script/_genpass-id view on Meta::CPAN
# ABSTRACT: Completer script for genpass-id
use 5.010;
use strict;
use warnings;
die "Please run this script under shell completion\n" unless $ENV{COMP_LINE} || $ENV{COMMAND_LINE};
my $args = {program_name=>"genpass-id",read_config=>0,read_env=>0,skip_format=>undef,subcommands=>undef,url=>"/App/Genpass/ID/genpass"};
my $meta = {_orig_args_as=>undef,_orig_result_naked=>undef,args=>{num=>{cmdline_aliases=>{n=>{}},default=>1,schema=>["int",{min=>1,req=>1},{}]},patterns=>{cmdline_aliases=>{p=>{}},default=>["%w %w %w","%w %w %w %w","%w %w %w %w %w","%w %w %w %w %w %w...
my $sc_metas = {};
my $copts = {format=>{default=>undef,getopt=>"format=s",handler=>sub{package Perinci::CmdLine::Base;use warnings;use strict;no feature;use feature ':5.10';my($go, $val, $r) = @_;$$r{'format'} = $val},is_settable_via_config=>1,schema=>["str*","in",["t...
my $r = {};
# get words
my $shell;
my ($words, $cword);
script/genpass-id view on Meta::CPAN
#!perl
### code_after_shebang
# Note: This script is a CLI for Riap function /App/Genpass/ID/genpass
# and generated automatically using Perinci::CmdLine::Gen version 0.483
# PERICMD_INLINE_SCRIPT: {"code_after_shebang":"...","config_dirs":null,"config_filename":"genpass-id.conf","env_name":"GENPASS_ID_OPT","include":null,"log":null,"pack_deps":1,"pod":0,"read_config":1,"read_env":1,"script_name":"genpass-id","script_su...
my $_pci_metas = {""=>{args=>{num=>{cmdline_aliases=>{n=>{}},default=>1,schema=>["int",{min=>1,req=>1},{}]},patterns=>{cmdline_aliases=>{p=>{}},default=>["%w %w %w","%w %w %w %w","%w %w %w %w %w","%w %w %w %w %w %w","%W%4d%W","%W%6d%s"],description=>...
# This script is generated by Perinci::CmdLine::Inline version 0.541 on Tue Jan 2 11:42:34 2018.
# Rinci metadata taken from these modules: App::Genpass::ID (no version)
# You probably should not manually edit this file.
our $DATE = '2018-01-02'; # DATE
our $VERSION = '0.003'; # VERSION
# PODNAME: genpass-id
script/genpass-id view on Meta::CPAN
A pattern is string that is similar to a printf pattern. %P (where P is certain
letter signifying a format) will be replaced with some other string. %NP (where
N is a number) will be replaced by a word of length N, %N$Mw (where N and M is a
number) will be replaced by a word of length between N and M. Anything else will
be used as-is. Available conversions:
%w Random word, all lowercase.
%W Random word, first letter uppercase, the rest lowercase.
%s Random ASCII symbol, e.g. "-" (dash), "_" (underscore), etc.
%d Random digit (0-9).
%% A literal percent sign.
Can be specified multiple times.
=item B<--patterns-json>=I<s>
Pattern(s) to use (JSON-encoded).
See C<--pattern>.
script/genpass-id view on Meta::CPAN
# $t[5]+1900, $t[4]+1, $t[3]);
# }
# }
# } elsif ($fmt_name eq 'boolstr') {
# $row->[$j] = $row->[$j] ? "yes" : "no";
# } elsif ($fmt_name eq 'sci2dec') {
# if ($row->[$j] =~ /\A(?:[+-]?)(?:\d+\.|\d*\.(\d+))[eE]([+-]?\d+)\z/) {
# my $n = length($1 || "") - $2; $n = 0 if $n < 0;
# $row->[$j] = sprintf("%.${n}f", $row->[$j]);
# }
# } elsif ($fmt_name eq 'percent') {
# my $fmt = $fmt_opts->{sprintf} // '%.2f%%';
# $row->[$j] = sprintf($fmt, $row->[$j] * 100);
# } elsif ($fmt_name eq 'number') {
# require Number::Format::BigFloat;
# $row->[$j] = Number::Format::BigFloat::format_number(
# $row->[$j], {
# thousands_sep => $fmt_opts->{thousands_sep} // ',',
# decimal_point => $fmt_opts->{decimal_point} // '.',
# decimal_digits => $fmt_opts->{precision} // 0,
# });
( run in 0.370 second using v1.01-cache-2.11-cpan-05162d3a2b1 )