App-Genpass-WordList

 view release on metacpan or  search on metacpan

script/genpass-wordlist  view on Meta::CPAN

#!perl

### code_after_shebang
# Note: This script is a CLI  for Riap function /App/Genpass/WordList/genpass
# and generated automatically using Perinci::CmdLine::Gen version 0.483

# PERICMD_INLINE_SCRIPT: {"code_after_shebang":"...","config_dirs":null,"config_filename":"genpass-wordlist.conf","env_name":"GENPASS_WORDLIST_OPT","include":null,"log":null,"pack_deps":1,"pod":0,"read_config":1,"read_env":1,"script_name":"genpass-wo...

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:22:14 2018.

# Rinci metadata taken from these modules: App::Genpass::WordList (no version)

# You probably should not manually edit this file.

our $DATE = '2018-01-02'; # DATE
our $VERSION = '0.002'; # VERSION
# PODNAME: genpass-wordlist
# ABSTRACT: Generate password with words from WordList::*

# BEGIN DATAPACK CODE
{
    my $toc;
    my $data_linepos = 1;
    unshift @INC, sub {
        $toc ||= do {

            my $fh = \*DATA;

        my $header_line;
        my $header_found;
        while (1) {
            my $header_line = <$fh>;
            defined($header_line)
                or die "Unexpected end of data section while reading header line";
            chomp($header_line);
            if ($header_line eq 'Data::Section::Seekable v1') {
                $header_found++;
                last;
            }
        }
        die "Can't find header 'Data::Section::Seekable v1'"
            unless $header_found;

        my %toc;
        my $i = 0;
        while (1) {
            $i++;
            my $toc_line = <$fh>;
            defined($toc_line)
                or die "Unexpected end of data section while reading TOC line #$i";
            chomp($toc_line);
            $toc_line =~ /\S/ or last;
            $toc_line =~ /^([^,]+),(\d+),(\d+)(?:,(.*))?$/
                or die "Invalid TOC line #$i in data section: $toc_line";
            $toc{$1} = [$2, $3, $4];
        }
        my $pos = tell $fh;
        $toc{$_}[0] += $pos for keys %toc;


            # calculate the line number of data section
            my $data_pos = tell(DATA);
            seek DATA, 0, 0;
            my $pos = 0;
            while (1) {



( run in 0.760 second using v1.01-cache-2.11-cpan-39bf76dae61 )