view release on metacpan or search on metacpan
lib/Acme/ID/CompanyName.pm view on Meta::CPAN
203204205206207208209210211212213214215216217218219220221222223lotus
luas
lumbung
mahkota
maju
makmur
maksindo
mandala
mandiri
mapan
marga
maritim
mas
media
megah
mekar
menara
menuju
milenia
milenial
script/gen-generic-ind-company-names view on Meta::CPAN
613614615616617618619620621622623624625626627628629630631632633634635636637# # To make a copy:
# # - Prepare a reference to the same type of structure;
# # - Store it in the cache, to avoid looping if it refers to itself;
# # - Tie in to the same class as the original, if it was tied;
# # - Assign a value to the reference by cloning each item in the original;
#
# my $copy;
# if ($ref_type eq 'HASH') {
# $CloneCache{ $source } = $copy = {};
# if ( my $tied = tied( %$source ) ) { tie %$copy, ref $tied }
# %$copy = map { ! ref($_) ? $_ : clone($_, $depth) } %$source;
# } elsif ($ref_type eq 'ARRAY') {
# $CloneCache{ $source } = $copy = [];
# if ( my $tied = tied( @$source ) ) { tie @$copy, ref $tied }
# @$copy = map { ! ref($_) ? $_ : clone($_, $depth) } @$source;
# } elsif ($ref_type eq 'REF' or $ref_type eq 'SCALAR') {
# $CloneCache{ $source } = $copy = \( my $var = "" );
# if ( my $tied = tied( $$source ) ) { tie $$copy, ref $tied }
# $$copy = clone($$source, $depth);
# } else {
# # Shallow copy anything else; this handles a reference to code, glob, regex
# $CloneCache{ $source } = $copy = $source;
# }
#
# # - Bless it into the same class as the original, if it was blessed;
script/gen-generic-ind-company-names view on Meta::CPAN
146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510# local *CHLD_OUT;
# local *CHLD_IN;
# my $pid = IPC::Open2::open2(
# \*CHLD_OUT, \*CHLD_IN, "fzf", "-m", "-d:", "--with-nth=2..")
# or do {
# @res = $code_return_message->("Cannot open fzf to filter ".
# scalar(@words)." items");
# goto RETURN_RES;
# };
#
# print CHLD_IN map { "$_:$res[$_]\n" } 0..$#res;
# close CHLD_IN;
#
# my @res_words;
# while (<CHLD_OUT>) {
# my ($index) = /\A([0-9]+)\:/ or next;
# push @res_words, $words[$index];
# }
# if (@res_words) {
# @res = join(" ", @res_words);
# } else {
# @res = ();
# }
# waitpid($pid, 0);
# }
#
# RETURN_RES:
# #use Data::Dump; warn Data::Dump::dump(\@res);
# if ($as eq 'array') {
# return \@res;
# } else {
# return join("", map {($_, "\n")} @res);
# }
#}
#
#1;
## ABSTRACT: Completion routines for bash shell
#
#__END__
#
#=pod
#
script/gen-generic-ind-company-names view on Meta::CPAN
383838393840384138423843384438453846384738483849385038513852385338543855385638573858# }
#
# }
# $clset->{req} = 1 if $opts->{has_req};
#
# # XXX option to recursively normalize clset, any's of, all's of, ...
# #if ($clset->{clset}) {
# # local $opts->{has_req};
# # if ($clset->{'clset.op'} && $clset->{'clset.op'} =~ /and|or/) {
# # # multiple clause sets
# # $clset->{clset} = map { $self->normalize_clset($_, $opts) }
# # @{ $clset->{clset} };
# # } else {
# # $clset->{clset} = $self->normalize_clset($_, $opts);
# # }
# #}
#
# $clset;
#}
#
#sub normalize_schema($) {
script/gen-generic-ind-company-names view on Meta::CPAN
467546764677467846794680468146824683468446854686468746884689469046914692469346944695# $Object_Targets{$addr} = [$target_name, $per_target_conf];
# } elsif ($target_type eq 'hash') {
# my ($addr) = "$target_name" =~ $re_addr;
# unless ($replace) { return if $Hash_Targets{$addr} }
# $Hash_Targets{$addr} = [$target_name, $per_target_conf];
# }
#}
#
#sub _set_default_null_routines {
# $default_null_routines ||= [
# (map {(
# [$sub0, "log_$_", $Levels{$_}, 'logger_sub'],
# [$Levels{$_} > $Current_Level ? $sub0 : $sub1, "log_is_$_", $Levels{$_}, 'level_checker_sub'],
# [$sub0, $_, $Levels{$_}, 'logger_method'],
# [$Levels{$_} > $Current_Level ? $sub0 : $sub1, "is_$_", $Levels{$_}, 'level_checker_method'],
# )} keys %Levels),
# ];
#}
#
#sub get_logger {
# my ($package, %per_target_conf) = @_;
script/gen-generic-ind-company-names view on Meta::CPAN
4981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008#sub read_config {
# require Config::IOD::Reader;
#
# my %args = @_;
#
# my $config_dirs = $args{config_dirs} // get_default_config_dirs();
#
# my $paths;
#
# my @filenames;
# my %section_config_filename_map;
# if (my $names = $args{config_filename}) {
# for my $name (ref($names) eq 'ARRAY' ? @$names : ($names)) {
# if (ref($name) eq 'HASH') {
# $section_config_filename_map{$name->{filename}} = $name->{section};
# push @filenames, $name->{filename};
# } else {
# $section_config_filename_map{$name} = 'GLOBAL';
# push @filenames, $name;
# }
# }
# }
# unless (@filenames) {
# @filenames = (($args{program_name} // "prog") . ".conf");
# }
#
# if ($args{config_paths}) {
# $paths = $args{config_paths};
script/gen-generic-ind-company-names view on Meta::CPAN
501650175018501950205021502250235024502550265027502850295030503150325033503450355036# }
#
# my $reader = Config::IOD::Reader->new;
# my %res;
# my @read;
# my %section_read_order;
# FILE:
# for my $i (0..$#{$paths}) {
# my $path = $paths->[$i];
# my $filename = $path; $filename =~ s!.*[/\\]!!;
# my $wanted_section = $section_config_filename_map{$filename};
# log_trace "[pericmd] Reading config file '%s' ...", $path;
# my $j = 0;
# $section_read_order{GLOBAL} = [$i, $j++];
# my @file_sections = ("GLOBAL");
# my $hoh = $reader->read_file(
# $path,
# sub {
# my %args = @_;
# return unless $args{event} eq 'section';
# my $section = $args{section};
script/gen-generic-ind-company-names view on Meta::CPAN
556955705571557255735574557555765577557855795580558155825583558455855586558755885589#sub __gen_table {
# my ($data, $header_row, $resmeta, $format) = @_;
#
# $resmeta //= {};
#
# # column names
# my @columns;
# if ($header_row) {
# @columns = @{$data->[0]};
# } else {
# @columns = map {"col$_"} 0..@{$data->[0]}-1;
# }
#
# my $column_orders; # e.g. [col2, col1, col3, ...]
# SET_COLUMN_ORDERS: {
#
# # find column orders from 'table_column_orders' in result metadata (or
# # from env)
# my $tcos;
# if ($ENV{FORMAT_PRETTY_TABLE_COLUMN_ORDERS}) {
# $tcos = _json->encode($ENV{FORMAT_PRETTY_TABLE_COLUMN_ORDERS});
script/gen-generic-ind-company-names view on Meta::CPAN
561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653# }
#
# # find column orders from table spec
# $column_orders = $resmeta->{'table.fields'};
# }
#
# # reorder each row according to requested column order
# if ($column_orders) {
# require Sort::BySpec;
# my $cmp = Sort::BySpec::cmp_by_spec(spec => $column_orders);
# # 0->2, 1->0, ... (map column position from unordered to ordered)
# my @map0 = sort { $cmp->($a->[1], $b->[1]) }
# map {[$_, $columns[$_]]} 0..$#columns;
# #use DD; dd \@map0;
# my @map;
# for (0..$#map0) {
# $map[$_] = $map0[$_][0];
# }
# #use DD; dd \@map;
# my $newdata = [];
# for my $row (@$data) {
# my @newrow;
# for (0..$#map) { $newrow[$_] = $row->[$map[$_]] }
# push @$newdata, \@newrow;
# }
# $data = $newdata;
# my @newcolumns;
# for (@map) { push @newcolumns, $columns[$_] }
# @columns = @newcolumns;
# }
#
# my @field_idxs; # map column to index in table.fields
# {
# my $tff = $resmeta->{'table.fields'} or last;
# for my $i (0..$#columns) {
# $field_idxs[$i] = firstidx { $_ eq $columns[$i] } @$tff;
# }
# }
#
# # determine field labels
# {
# last unless $header_row && @$data;
script/gen-generic-ind-company-names view on Meta::CPAN
580058015802580358045805580658075808580958105811581258135814581558165817581858195820# $maxw_d = max(@w_d);
# $maxw_ad = max(@w_ad);
# if ($header_row) {
# my $w = length($data->[0][$colidx]);
# if ($maxw_d == 0 && $maxw_ad == 0) {
# $maxw_bd = $w;
# }
# }
# }
#
# $maxw = max(map {
# @$_ > $colidx ? length($_->[$colidx]) : 0
# } @$data);
#
# # do the alignment
# for my $i (0..$#{$data}) {
# my $row = $data->[$i];
# for my $i (0..$#{$data}) {
# my $row = $data->[$i];
# next unless @$row > $colidx;
# my $cell = $row->[$colidx];
script/gen-generic-ind-company-names view on Meta::CPAN
5866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890# } else {
# require Text::Table::Sprintf;
# $fres = Text::Table::Sprintf::table(rows=>$data, header_row=>$header_row);
# }
# $fres .= "\n" unless $fres =~ /\R\z/ || !length($fres);
# $fres;
# } elsif ($format eq 'csv') {
# no warnings 'uninitialized';
# join(
# "",
# map {
# my $row = $_;
# join(
# ",",
# map {
# my $cell = $_;
# $cell =~ s/(["\\])/\\$1/g;
# qq("$cell");
# } @$row)."\n";
# } @$data
# );
# } elsif ($format eq 'html') {
# no warnings 'uninitialized';
# require HTML::Entities;
#
script/gen-generic-ind-company-names view on Meta::CPAN
591659175918591959205921592259235924592559265927592859295930593159325933593459355936# }
# push @res, " </tr>\n";
# push @res, "</thead>\n" if $i == 0;
# }
# push @res, "</tbody>\n";
# push @res, "</table>\n";
# join '', @res;
# } else {
# no warnings 'uninitialized';
# shift @$data if $header_row;
# join("", map {join("\t", @$_)."\n"} @$data);
# }
#}
#
#sub format {
# my ($res, $format, $is_naked, $cleanse) = @_;
#
# if ($format =~ /\A(text|text-simple|text-pretty|csv|html)\z/) {
# $format = $format eq 'text' ?
# ((-t STDOUT) ? 'text-pretty' : 'text-simple') : $format;
# no warnings 'uninitialized';
script/gen-generic-ind-company-names view on Meta::CPAN
5946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994# require Data::Check::Structure;
# my $data = $res->[2];
# my $max = 1000;
# if (!ref($data)) {
# $data //= "";
# $data .= "\n" unless !length($data) || $data =~ /\n\z/;
# return $data;
# } elsif (ref($data) eq 'ARRAY' && !@$data) {
# return "";
# } elsif (Data::Check::Structure::is_aos($data, {max=>$max})) {
# return join("", map {"$_\n"} @$data);
# } elsif (Data::Check::Structure::is_aoaos($data, {max=>$max})) {
# my $header_row = 0;
# my $data = $data;
# if ($res->[3]{'table.fields'}) {
# $data = [$res->[3]{'table.fields'}, @$data];
# $header_row = 1;
# }
# return __gen_table($data, $header_row, $res->[3], $format);
# } elsif (Data::Check::Structure::is_hos($data, {max=>$max})) {
# $data = [map {[$_, $data->{$_}]} sort keys %$data];
# unshift @$data, ["key", "value"];
# return __gen_table($data, 1, $res->[3], $format);
# } elsif (Data::Check::Structure::is_aohos($data, {max=>$max})) {
# # collect all mentioned fields
# my @fieldnames;
# if ($res->[3] && $res->[3]{'table.fields'} &&
# $res->[3]{'table.hide_unknown_fields'}) {
# @fieldnames = @{ $res->[3]{'table.fields'} };
# } else {
# my %fieldnames;
# for my $row (@$data) {
# $fieldnames{$_}++ for keys %$row;
# }
# @fieldnames = sort keys %fieldnames;
# }
# my $newdata = [];
# for my $row (@$data) {
# push @$newdata, [map {$row->{$_}} @fieldnames];
# }
# unshift @$newdata, \@fieldnames;
# return __gen_table($newdata, 1, $res->[3], $format);
# } else {
# $format = 'json-pretty';
# }
# }
# }
#
# my $tff = $res->[3]{'table.fields'};
script/gen-generic-ind-company-names view on Meta::CPAN
687668776878687968806881688268836884688568866887688868896890689168926893689468956896# return _rule_row($param, $widths, $char->{BLC}, $char->{HR}, $char->{BT}, $char->{BRC});
#}
#
#sub _rule_row
#{
# my ($param, $widths, $le, $hr, $cross, $re) = @_;
# my $pad = $param->{compact} ? '' : $hr;
#
# return $param->{indent}
# .$le
# .join($cross, map { $pad.($hr x $_).$pad } @$widths)
# .$re
# ."\n"
# ;
#}
#
#sub _header_row
#{
# my ($param, $row, $widths, $align, $char) = @_;
# return '' unless $param->{header_row};
#
script/gen-generic-ind-company-names view on Meta::CPAN
690469056906690769086909691069116912691369146915691669176918691969206921692269236924# my $fancy = $param->{separate_rows} ? 'F' : '';
#
# return _rule_row($param, $widths, $char->{"${fancy}LT"}, $char->{"${fancy}HR"}, $char->{"${fancy}HC"}, $char->{"${fancy}RT"});
#}
#
#sub _body
#{
# my ($param, $rows, $widths, $align, $char) = @_;
# my $divider = $param->{separate_rows} ? _rule_row($param, $widths, $char->{LT}, $char->{HR}, $char->{HC}, $char->{RT}) : '';
#
# return join($divider, map { _text_row($param, $_, $widths, $align, $char) } @$rows);
#}
#
#sub _text_row
#{
# my ($param, $row, $widths, $align, $char) = @_;
# my @columns = @$row;
# my $text = $param->{indent}.$char->{VR};
#
# for (my $i = 0; $i < @$widths; $i++) {
# $text .= _format_column($columns[$i] // '', $widths->[$i], $align->[$i] // 'l', $param, $char);
t/00-compile.t view on Meta::CPAN
272829303132333435363738394041424344454647use
IO::Handle;
open
my
$stdin
,
'<'
, File::Spec->devnull or
die
"can't open devnull: $!"
;
my
@warnings
;
for
my
$lib
(
@module_files
)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my
$stderr
= IO::Handle->new;
diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
t/00-compile.t view on Meta::CPAN
606162636465666768697071727374757677787980my
$line
= <
$fh
>;
close
$fh
and skip(
"$file isn't perl"
, 1)
unless
$line
=~ /^
#!\s*(?:\S*perl\S*)((?:\s+-\w*)*)(?:\s*#.*)?$/;
@switches
= (
@switches
,
split
(
' '
, $1))
if
$1;
close
$fh
and skip(
"$file uses -T; not testable with PERL5LIB"
, 1)
if
grep
{
$_
eq
'-T'
}
@switches
and
$ENV
{PERL5LIB};
my
$stderr
= IO::Handle->new;
diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-c'
,
$file
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-c'
,
$file
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$file compiled ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/