App-hr
view release on metacpan or search on metacpan
To contribute, you can send patches by email/via RT, or send pull requests on
GitHub.
Most of the time, you don't need to build the distribution yourself. You can
simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your
system), you can install L<Dist::Zilla>,
L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
that are considered a bug and can be reported to me.
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2022, 2021, 2020, 2018, 2016, 2015, 2014 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-hr>
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=cut
__DATA__
Data::Section::Seekable v1
Clone/PP.pm,20,6331,0;0
Complete/Bash.pm,6376,39632,1;193
Complete/Common.pm,46035,6507,2;1432
Complete/Env.pm,52566,5656,3;1628
Complete/File.pm,58247,14391,4;1886
Complete/Getopt/Long.pm,72670,36939,5;2353
Complete/Path.pm,109634,17195,6;3372
Complete/Sah.pm,126853,17126,7;3887
Complete/Tcsh.pm,144004,6850,8;4333
Complete/Util.pm,150879,40883,9;4589
Data/Clean.pm,191784,18073,10;6007
Data/Clean/ForJSON.pm,209887,8992,11;6605
Data/Clean/FromJSON.pm,218910,3100,12;6898
Data/Dmp.pm,222030,14913,13;7022
Data/ModeMerge.pm,236969,26971,14;7502
Data/ModeMerge/Config.pm,263973,14454,15;8287
Data/ModeMerge/Mode/ADD.pm,278462,2657,16;8811
Data/ModeMerge/Mode/Base.pm,281155,22041,17;8931
Data/ModeMerge/Mode/CONCAT.pm,303234,1741,18;9604
Data/ModeMerge/Mode/DELETE.pm,305013,2738,19;9683
Data/ModeMerge/Mode/KEEP.pm,307787,2463,20;9813
Data/ModeMerge/Mode/NORMAL.pm,310288,2800,21;9932
Data/ModeMerge/Mode/SUBTRACT.pm,313128,3373,22;10076
Data/Sah/Normalize.pm,316531,9925,23;10219
Data/Sah/Resolve.pm,326484,12880,24;10519
Data/Sah/Util/Type.pm,339394,9456,25;10915
Function/Fallback/CoreOrPP.pm,348888,5030,26;11215
Getopt/Long/Negate/EN.pm,353951,5332,27;11410
Getopt/Long/Util.pm,359311,23625,28;11559
Lingua/EN/PluralToSingular.pm,382974,14259,29;12367
Log/ger.pm,397252,12239,30;13114
Log/ger/Filter.pm,409517,1220,31;13486
Log/ger/Filter/Code.pm,410768,1413,32;13553
Log/ger/Format.pm,412207,1364,33;13635
Log/ger/Format/Default.pm,413605,3317,34;13709
Log/ger/Format/MultilevelLog.pm,416962,5154,35;13827
Log/ger/Format/None.pm,422147,1340,36;14010
Log/ger/Heavy.pm,423512,18221,37;14078
Log/ger/Layout.pm,441759,1300,38;14480
Log/ger/Output.pm,443085,1429,39;14549
Log/ger/Output/Array.pm,444546,1603,40;14629
Log/ger/Output/Null.pm,446180,1344,41;14715
Log/ger/Output/String.pm,447557,2328,42;14784
Log/ger/Plugin.pm,449911,2056,43;14889
Log/ger/Plugin/MultilevelLog.pm,452007,3830,44;15004
Log/ger/Util.pm,455861,10301,45;15133
Mo.pm,466176,591,46;15461
Mo/Golf.pm,466786,8174,47;15465
Mo/Inline.pm,474981,3471,48;15701
Mo/Moose.pm,478472,533,49;15842
Mo/Mouse.pm,479025,563,50;15847
Mo/build.pm,479608,248,51;15852
Mo/builder.pm,479878,338,52;15856
Mo/chain.pm,480236,216,53;15860
Mo/coerce.pm,480473,330,54;15864
Mo/default.pm,480825,435,55;15868
Mo/exporter.pm,481283,176,56;15872
Mo/import.pm,481480,185,57;15876
Mo/importer.pm,481688,207,58;15880
Mo/is.pm,481912,228,59;15884
Mo/nonlazy.pm,482162,129,60;15888
Mo/option.pm,482312,259,61;15892
Mo/required.pm,482594,340,62;15896
Mo/xs.pm,482951,256,63;15900
Module/Installed/Tiny.pm,483240,14112,64;15904
Perinci/Sub/Complete.pm,497384,57325,65;16329
Perinci/Sub/GetArgs/Argv.pm,554745,57538,66;17957
Perinci/Sub/GetArgs/Array.pm,612320,7479,67;19495
Perinci/Sub/Normalize.pm,619832,7405,68;19755
Perinci/Sub/Util.pm,627265,22252,69;19996
Perinci/Sub/Util/Args.pm,649550,6306,70;20799
Perinci/Sub/Util/ResObj.pm,655891,1571,71;21053
Perinci/Sub/Util/Sort.pm,657495,1983,72;21114
Regexp/Stringify.pm,659506,5418,73;21205
Sah/Schema/rinci/function_meta.pm,664966,7232,74;21402
Sah/Schema/rinci/meta.pm,672231,3728,75;21672
Sah/Schema/rinci/result_meta.pm,675999,3863,76;21838
Sah/SchemaR/rinci/function_meta.pm,679905,7691,77;22004
Sah/SchemaR/rinci/meta.pm,687630,3371,78;22062
Sah/SchemaR/rinci/result_meta.pm,691042,2446,79;22120
Sah/Schemas/Rinci.pm,693517,1688,80;22178
String/LineNumber.pm,695234,2512,81;22254
String/PerlQuote.pm,697774,3383,82;22372
String/Wildcard/Bash.pm,701189,15067,83;22497
YAML/Old.pm,716276,3321,84;23003
YAML/Old/Dumper.pm,719624,17730,85;23120
YAML/Old/Dumper/Base.pm,737386,3735,86;23697
YAML/Old/Error.pm,741147,5985,87;23808
YAML/Old/Loader.pm,747159,25286,88;23999
YAML/Old/Loader/Base.pm,772477,1235,89;24770
YAML/Old/Marshall.pm,773741,934,90;24807
YAML/Old/Mo.pm,774698,3416,91;24854
YAML/Old/Node.pm,778139,4692,92;24934
YAML/Old/Tag.pm,782855,240,93;25152
YAML/Old/Types.pm,783121,6708,94;25171
### Clone/PP.pm ###
#package Clone::PP;
#
#use 5.006;
#use strict;
#use warnings;
#use vars qw($VERSION @EXPORT_OK);
#use Exporter;
#
#$VERSION = 1.08;
#
#@EXPORT_OK = qw( clone );
#sub import { goto &Exporter::import } # lazy Exporter
#
## These methods can be temporarily overridden to work with a given class.
#use vars qw( $CloneSelfMethod $CloneInitMethod );
#$CloneSelfMethod ||= 'clone_self';
#$CloneInitMethod ||= 'clone_init';
#
## Used to detect looped networks and avoid infinite recursion.
#use vars qw( %CloneCache );
#
## Generic cloning function
#sub clone {
# my $source = shift;
#
# return undef if not defined($source);
#
# # Optional depth limit: after a given number of levels, do shallow copy.
# my $depth = shift;
# return $source if ( defined $depth and $depth -- < 1 );
#
# # Maintain a shared cache during recursive calls, then clear it at the end.
# local %CloneCache = ( undef => undef ) unless ( exists $CloneCache{undef} );
#
# return $CloneCache{ $source } if ( defined $CloneCache{ $source } );
#
# # Non-reference values are copied shallowly
# my $ref_type = ref $source or return $source;
#
# # Extract both the structure type and the class name of referent
# my $class_name;
# if ( "$source" =~ /^\Q$ref_type\E\=([A-Z]+)\(0x[0-9a-f]+\)$/ ) {
# $class_name = $ref_type;
# $ref_type = $1;
# # Some objects would prefer to clone themselves; check for clone_self().
# return $CloneCache{ $source } = $source->$CloneSelfMethod()
# if $source->can($CloneSelfMethod);
# }
#
# # 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;
#customize options.
#
#=head2 CLASS->new() => $obj
#
#=head2 $obj->clean_in_place($data) => $cleaned
#
#Clean $data. Modify data in-place.
#
#=head2 $obj->clone_and_clean($data) => $cleaned
#
#Clean $data. Clone $data first.
#
#=head1 FAQ
#
#=head2 Why am I getting 'Modification of a read-only value attempted at lib/Data/Clean.pm line xxx'?
#
#[2013-10-15 ] This is also from Data::Clone::clone() when it encounters
#JSON::{PP,XS}::Boolean objects. You can use clean_in_place() instead of
#clone_and_clean(), or clone your data using other cloner like L<Sereal>.
#
#=head1 ENVIRONMENT
#
#LOG_CLEANSER_CODE
#
#=head1 HOMEPAGE
#
#Please visit the project's homepage at L<https://metacpan.org/release/Data-Clean-ForJSON>.
#
#=head1 SOURCE
#
#Source repository is at L<https://github.com/perlancar/perl-Data-Clean-ForJSON>.
#
#=head1 BUGS
#
#Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Clean-ForJSON>
#
#When submitting a bug or request, please include a test-file or a
#patch to an existing test-file that illustrates the bug or desired
#feature.
#
#=head1 AUTHOR
#
#perlancar <perlancar@cpan.org>
#
#=head1 COPYRIGHT AND LICENSE
#
#This software is copyright (c) 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012 by perlancar@cpan.org.
#
#This is free software; you can redistribute it and/or modify it under
#the same terms as the Perl 5 programming language system itself.
#
#=cut
### Data/Dmp.pm ###
### no critic: Modules::ProhibitAutomaticExportation
#
#package Data::Dmp;
#
#our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
#our $DATE = '2022-08-28'; # DATE
#our $DIST = 'Data-Dmp'; # DIST
#our $VERSION = '0.242'; # VERSION
#
#use 5.010001;
#use strict;
#use warnings;
#
#use Scalar::Util qw(looks_like_number blessed reftype refaddr);
#
#require Exporter;
#our @ISA = qw(Exporter);
#our @EXPORT = qw(dd dmp);
#our @EXPORT_OK = qw(dd_ellipsis dmp_ellipsis);
#
## for when dealing with circular refs
#our %_seen_refaddrs;
#our %_subscripts;
#our @_fixups;
#
#our $OPT_MAX_DUMP_LEN_BEFORE_ELLIPSIS = 70;
#our $OPT_PERL_VERSION = "5.010";
#our $OPT_REMOVE_PRAGMAS = 0;
#our $OPT_DEPARSE = 1;
#our $OPT_STRINGIFY_NUMBERS = 0;
#
## BEGIN COPY PASTE FROM Data::Dump
#my %esc = (
# "\a" => "\\a",
# "\b" => "\\b",
# "\t" => "\\t",
# "\n" => "\\n",
# "\f" => "\\f",
# "\r" => "\\r",
# "\e" => "\\e",
#);
#
## put a string value in double quotes
#sub _double_quote {
# local($_) = $_[0];
#
# # If there are many '"' we might want to use qq() instead
# s/([\\\"\@\$])/\\$1/g;
# return qq("$_") unless /[^\040-\176]/; # fast exit
#
# s/([\a\b\t\n\f\r\e])/$esc{$1}/g;
#
# # no need for 3 digits in escape for these
# s/([\0-\037])(?!\d)/sprintf('\\%o',ord($1))/eg;
#
# s/([\0-\037\177-\377])/sprintf('\\x%02X',ord($1))/eg;
# s/([^\040-\176])/sprintf('\\x{%X}',ord($1))/eg;
#
# return qq("$_");
#}
## END COPY PASTE FROM Data::Dump
#
## BEGIN COPY PASTE FROM String::PerlQuote
#sub _single_quote {
# local($_) = $_[0];
# s/([\\'])/\\$1/g;
# return qq('$_');
#}
# $res = $OPT_DEPARSE ? _dump_code($val) : 'sub{"DUMMY"}';
# } else {
# die "Sorry, I can't dump $val (ref=$ref) yet";
# }
#
# $res = "bless($res,"._double_quote($class).")" if defined($class);
# $res;
#}
#
#our $_is_dd;
#our $_is_ellipsis;
#sub _dd_or_dmp {
# local %_seen_refaddrs;
# local %_subscripts;
# local @_fixups;
#
# my $res;
# if (@_ > 1) {
# $res = "(" . join(",", map {_dump($_, '')} @_) . ")";
# } else {
# $res = _dump($_[0], '');
# }
# if (@_fixups) {
# $res = "do{my\$var=$res;" . join("", @_fixups) . "\$var}";
# }
#
# if ($_is_ellipsis) {
# $res = substr($res, 0, $OPT_MAX_DUMP_LEN_BEFORE_ELLIPSIS) . '...'
# if length($res) > $OPT_MAX_DUMP_LEN_BEFORE_ELLIPSIS;
# }
#
# if ($_is_dd) {
# say $res;
# return wantarray() || @_ > 1 ? @_ : $_[0];
# } else {
# return $res;
# }
#}
#
#sub dd { local $_is_dd=1; _dd_or_dmp(@_) } # goto &sub doesn't work with local
#sub dmp { goto &_dd_or_dmp }
#
#sub dd_ellipsis { local $_is_dd=1; local $_is_ellipsis=1; _dd_or_dmp(@_) }
#sub dmp_ellipsis { local $_is_ellipsis=1; _dd_or_dmp(@_) }
#
#1;
## ABSTRACT: Dump Perl data structures as Perl code
#
#__END__
#
#=pod
#
#=encoding UTF-8
#
#=head1 NAME
#
#Data::Dmp - Dump Perl data structures as Perl code
#
#=head1 VERSION
#
#This document describes version 0.242 of Data::Dmp (from Perl distribution Data-Dmp), released on 2022-08-28.
#
#=head1 SYNOPSIS
#
# use Data::Dmp; # exports dd() and dmp()
# dd [1, 2, 3]; # prints "[1,2,3]"
# $var = dmp({a => 1}); # -> "{a=>1}"
#
#Print truncated dump (capped at L</$Data::Dmp::OPT_MAX_DUMP_LEN_BEFORE_ELLIPSIS>
#characters):
#
# use Data::Dmp qw(dd_ellipsis dmp_ellipsis);
# dd_ellipsis [1..100];
#
#=head1 DESCRIPTION
#
#Data::Dmp is a Perl dumper like L<Data::Dumper>. It's compact (only about 200
#lines of code long), starts fast and does not use any non-core modules except
#L<Regexp::Stringify> when dumping regexes. It produces compact single-line
#output (similar to L<Data::Dumper::Concise>). It roughly has the same speed as
#Data::Dumper (usually a bit faster for smaller structures) and faster than
#L<Data::Dump>, but does not offer the various formatting options. It supports
#dumping objects, regexes, circular structures, coderefs. Its code is first based
#on L<Data::Dump>: I removed all the parts that I don't need, particularly the
#pretty formatting stuffs) and added some features that I need like proper regex
#dumping and coderef deparsing.
#
#=head1 VARIABLES
#
#=head2 $Data::Dmp::OPT_PERL_VERSION
#
#String, default: 5.010.
#
#Set target Perl version. If you set this to, say C<5.010>, then the dumped code
#will keep compatibility with Perl 5.10.0. This is used in the following ways:
#
#=over
#
#=item * passed to L<Regexp::Stringify>
#
#=item * when dumping code references
#
#For example, in perls earlier than 5.016, feature.pm does not understand:
#
# no feature ':all';
#
#so we replace it with:
#
# no feature;
#
#=back
#
#=head2 $Data::Dmp::OPT_REMOVE_PRAGMAS
#
#Bool, default: 0.
#
#If set to 1, then pragmas at the start of coderef dump will be removed. Coderef
#dump is produced by L<B::Deparse> and is of the form like:
#
# sub { use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; $a <=> $b }
#
# $tree->find( $finder_subs{$_} )
# for qw( del_superfluous_concat del_last_semicolon_in_block separate_version shorten_var_names shorten_barewords );
# die $@ if $@;
#
# for my $name ( 'double_semicolon' ) {
# my $elements = $tree->find( $finder_subs{$name} );
# die $@ if !defined $elements;
# $_->delete for @{ $elements || [] };
# }
#
# return $tree->serialize . "\n";
#}
#
#sub tok { "PPI::Token::$_[0]" }
#
#sub _finder_subs {
# return (
# comments => sub { $_[1]->isa( tok 'Comment' ) },
#
# duplicate_whitespace => sub {
# my ( $top, $current ) = @_;
# return 0 if !$current->isa( tok 'Whitespace' );
#
# $current->set_content(' ') if 1 < length $current->content;
#
# return 0 if !$current->next_token;
# return 0 if !$current->next_token->isa( tok 'Whitespace' );
# return 1;
# },
#
# whitespace => sub {
# my ( $top, $current ) = @_;
# return 0 if !$current->isa( tok 'Whitespace' );
# my $prev = $current->previous_token;
# my $next = $current->next_token;
#
# return 1 if $prev->isa( tok 'Number' ) and $next->isa( tok 'Operator' ) and $next->content =~ /^\W/; # my $P
# return 1 if $prev->isa( tok 'Word' ) and $next->isa( tok 'Operator' ) and $next->content =~ /^\W/; # my $P
# return 1 if $prev->isa( tok 'Symbol' ) and $next->isa( tok 'Operator' ) and $next->content =~ /^\W/; # $VERSION = but not $v and
#
# return 1 if $prev->isa( tok 'Operator' ) and $next->isa( tok 'Quote::Single' ) and $next->content =~ /^\W/; # eq ''
# return 1 if $prev->isa( tok 'Operator' ) and $next->isa( tok 'Quote::Double' ) and $next->content =~ /^\W/; # eq ""
# return 1 if $prev->isa( tok 'Operator' ) and $next->isa( tok 'Symbol' ) and $next->content =~ /^\W/; # eq $v
# return 1 if $prev->isa( tok 'Operator' ) and $next->isa( tok 'Structure' ) and $next->content =~ /^\W/; # eq (
#
# return 1 if $prev->isa( tok 'Word' ) and $next->isa( tok 'Symbol' ); # my $P
# return 1 if $prev->isa( tok 'Word' ) and $next->isa( tok 'Structure' ); # sub {
# return 1 if $prev->isa( tok 'Word' ) and $next->isa( tok 'Quote::Double' ); # eval "
# return 1 if $prev->isa( tok 'Symbol' ) and $next->isa( tok 'Structure' ); # %a )
# return 1 if $prev->isa( tok 'ArrayIndex' ) and $next->isa( tok 'Operator' ); # $#_ ?
# return 1 if $prev->isa( tok 'Word' ) and $next->isa( tok 'Cast' ); # exists &$_
# return 0;
# },
#
# trailing_whitespace => sub {
# my ( $top, $current ) = @_;
# return 0 if !$current->isa( tok 'Whitespace' );
# my $prev = $current->previous_token;
#
# return 1 if $prev->isa( tok 'Structure' ); # ;[\n\s]
# return 1 if $prev->isa( tok 'Operator' ) and $prev->content =~ /\W$/; # = 0.24
# return 1 if $prev->isa( tok 'Quote::Double' ); # " .
# return 1 if $prev->isa( tok 'Quote::Single' ); # ' }
#
# return 0;
# },
#
# double_semicolon => sub {
# my ( $top, $current ) = @_;
# return 0 if !$current->isa( tok 'Structure' );
# return 0 if $current->content ne ';';
#
# my $prev = $current->previous_token;
#
# return 0 if !$prev->isa( tok 'Structure' );
# return 0 if $prev->content ne ';';
#
# return 1;
# },
#
# del_last_semicolon_in_block => sub {
# my ( $top, $current ) = @_;
# return 0 if !$current->isa( 'PPI::Structure::Block' );
#
# my $last = $current->last_token;
#
# return 0 if !$last->isa( tok 'Structure' );
# return 0 if $last->content ne '}';
#
# my $maybe_semi = $last->previous_token;
#
# return 0 if !$maybe_semi->isa( tok 'Structure' );
# return 0 if $maybe_semi->content ne ';';
#
# $maybe_semi->delete;
#
# return 1;
# },
#
# del_superfluous_concat => sub {
# my ( $top, $current ) = @_;
# return 0 if !$current->isa( tok 'Operator' );
#
# my $prev = $current->previous_token;
# my $next = $current->next_token;
#
# return 0 if $current->content ne '.';
# return 0 if !$prev->isa( tok 'Quote::Double' );
# return 0 if !$next->isa( tok 'Quote::Double' );
#
# $current->delete;
# $prev->set_content( $prev->{separator} . $prev->string . $next->string . $prev->{separator} );
# $next->delete;
#
# return 1;
# },
#
# separate_version => sub {
# my ( $top, $current ) = @_;
# return 0 if !$current->isa( 'PPI::Statement' );
#
( run in 2.731 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )