App-hr
view release on metacpan or search on metacpan
# my $hr = $res->[2];
# return $hr if defined(wantarray);
# print $hr;
#}
#
#sub hr_Br {
# my $res = hr_app(blink=>1, random_color=>1, random_pattern=>1);
# my $hr = $res->[2];
# return $hr if defined(wantarray);
# print $hr;
#}
#
#1;
## ABSTRACT: Print horizontal bar on the terminal
#
#=for Pod::Coverage ^(pick)$
#
#=head1 SYNOPSIS
#
# use App::hr qw(hr hr_r);
# hr;
#
#Sample output:
#
# =============================================================================
#
#Set pattern:
#
# hr('x----');
#
#Sample output:
#
# x----x----x----x----x----x----x----x----x----x----x----x----x----x----x----x-
#
#Use random color and random pattern:
#
# hr_r;
#
#You can also use the provided CLI L<hr>.
#
#
#=head1 DESCRIPTION
#
#A demo screencast:
#
## IMAGE: share/images/screencast1.gif
#
#
#=head1 prepend:FUNCTIONS
#
#=head2 hr([ $pattern [, $color ] ]) => optional STR
#
#Print (under void context) or return (under scalar/array context) a horizontal
#ruler with the width of the terminal.
#
#Terminal width is determined using L<Term::Size>.
#
#C<$pattern> is optional, can be multicharacter, but cannot be empty string. The
#defautl is C<=>.
#
#Under Windows, will shave one character at the end because the terminal cursor
#will move a line down when printing at the last column.
#
#If C<$color> is set (to a color supported by L<Term::ANSIColor>) I<and> colored
#output is enabled, output will be colored. Colored output is enabled if: 1) no
#C<NO_COLOR> environment variable is defined; 2) C<COLOR> is undefined or true,
#or program is run interactively.
#
#=head2 hr_r => optional STR
#
#Like C<hr>, but will set random pattern and random color.
#
#=head2 hr_Br => optional STR
#
#Like C<hr>, but will set random pattern and random color and return a blinking
#bar.
#
#
#=head1 ENVIRONMENT
#
#=head2 NO_COLOR
#
#=head2 COLOR
#
#
#=head1 SEE ALSO
#
#L<ruler> (L<App::ruler>)
#
#=cut
### 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 );
( run in 0.756 second using v1.01-cache-2.11-cpan-39bf76dae61 )