view release on metacpan or search on metacpan
lib/App/Framework/Lite.pm view on Meta::CPAN
This should be a single line, concise summary of what the script does. It's used in the terse man page created by pod2man.
=head4 Description
As you'd expect, this should be a full description, user-guide etc. on what the script does and how to do it. Notice that this example
has used one (of many) of the variables available: $name (which expands to the script name, without any path or extension).
=head4 Example
An example script setup is:
lib/App/Framework/Lite.pm view on Meta::CPAN
Argument values can contain variables, defined using the standard Perl format:
$<name>
${<name>}
When the argument is used, the variable is expanded and replaced with a suitable value. The value will be looked up from a variety of possible sources:
object fields (where the variable name matches the field name) or environment variables.
The variable name is looked up in the following order, the first value found with a matching name is used:
=over 4
lib/App/Framework/Lite.pm view on Meta::CPAN
Option values and default values can contain variables, defined using the standard Perl format:
$<name>
${<name>}
When the option is used, the variable is expanded and replaced with a suitable value. The value will be looked up from a variety of possible sources:
object fields (where the variable name matches the field name) or environment variables.
The variable name is looked up in the following order, the first value found with a matching name is used:
=over 4
lib/App/Framework/Lite.pm view on Meta::CPAN
The data text can contain variables, defined using the standard Perl format:
$<name>
${<name>}
When the data is used, the variable is expanded and replaced with a suitable value. The value will be looked up from a variety of possible sources:
object fields (where the variable name matches the field name) or environment variables.
The variable name is looked up in the following order, the first value found with a matching name is used:
=over 4
lib/App/Framework/Lite.pm view on Meta::CPAN
my @vars ;
my %app_vars = $this->vars ;
push @vars, \%app_vars ;
push @vars, \%ENV ;
## expand all vars
$this->expand_keys(\%values, \@vars) ;
# set new values
foreach my $key (keys %$opt_values_href)
{
$opt_values_href->{$key} = $values{$key} ;
lib/App/Framework/Lite.pm view on Meta::CPAN
## handle any name clash
if (keys %args_clash)
{
unshift @vars, \%values ;
$this->expand_keys(\%args_clash, \@vars) ;
# set new values
foreach my $key (keys %args_clash)
{
$args_values_href->{$key} = $args_clash{$key} ;
lib/App/Framework/Lite.pm view on Meta::CPAN
Set up before running the application.
Calls the following methods in turn:
* getopts
* [internal _expand_vars method]
* options
=cut
lib/App/Framework/Lite.pm view on Meta::CPAN
## Get options
# NOTE: Need to do this here so that derived objects work properly
my $ok = $this->getopts() ;
## Expand any variables in the application object field values
$this->_expand_vars() ;
# Handle options errors here after expanding variables
unless ($ok)
{
$this->usage('opt') ;
$this->exit(1) ;
}
lib/App/Framework/Lite.pm view on Meta::CPAN
## Run application function
my %options = $this->options() ;
$this->_exec_fn('app_start', $this, \%options) ;
## expand data variables
my %app_vars = $this->vars() ;
my %opts = $this->options() ;
my $args_values_href = $this->args_values_hash() ;
my $data_href = $this->{_data_hash} ;
$this->expand_keys($data_href, [\%opts, $args_values_href, \%app_vars, \%ENV]) ;
}
#----------------------------------------------------------------------------
=item B<app_handle_opts()>
lib/App/Framework/Lite.pm view on Meta::CPAN
*Options = \&options ;
#----------------------------------------------------------------------------
#
#=item B<_expand_options()>
#
#Expand any variables in the options
#
#=cut
#
sub _expand_options
{
my $this = shift ;
$this->_dbg_prt(["_expand_options()\n"]) ;
my $options_href = $this->{_options} ;
my $options_fields_href = $this->{_option_fields_hash} ;
# get defaults & options
lib/App/Framework/Lite.pm view on Meta::CPAN
foreach my $opt (keys %$options_fields_href)
{
$defaults{$opt} = $options_fields_href->{$opt}{'default'} ;
$values{$opt} = $options_href->{$opt} if defined($options_href->{$opt}) ;
}
$this->_dbg_prt(["_expand_options: defaults=",\%defaults," values=",\%values,"\n"]) ;
# # get replacement vars
# my @vars ;
# my $app = $this->app ;
# if ($app)
# {
# my %app_vars = $app->vars ;
# push @vars, \%app_vars ;
# }
# ## expand
# my @vars ;
# push @vars, \%ENV ;
# $this->expand_keys(\%values, \@vars) ;
# push @vars, \%values ; # allow defaults to use user-specified values
# $this->expand_keys(\%defaults, \@vars) ;
#
#$this->_dbg_prt(["_expand_options - end: defaults=",\%defaults," values=",\%values,"\n"]) ;
## Update
foreach my $opt (keys %$options_fields_href)
{
# update defaults to reflect any user specified options
lib/App/Framework/Lite.pm view on Meta::CPAN
# Parse options using GetOpts
my $ok = GetOptions(@$get_options_aref) ;
# Expand the options variables
$this->_expand_options() ;
$this->_dbg_prt( ["get_options() : ok=$ok Options now=", $get_options_aref], 2 ) ;
return $ok ;
}
lib/App/Framework/Lite.pm view on Meta::CPAN
$this->_process_argv() ;
my %args ;
%args = $this->arg_hash() ;
$this->_dbg_prt(["Args before expand : hash=", \%args]) ;
# Expand the args variables
$this->_expand_args() ;
# Set arg list
my @arg_array ;
%args = $this->arg_hash() ;
my $arg_list = $this->{arg_names} ;
lib/App/Framework/Lite.pm view on Meta::CPAN
}
}
#----------------------------------------------------------------------------
#
#=item B<_expand_vars()>
#
#Run through some of the application variables/fields and expand any instances of variables embedded
#within the values.
#
#Example:
#
# __DATA_
#
# [SYNOPSIS]
#
# $name [options] <rrd file(s)>
#
#Here the 'synopsis' field contains the $name field variable. This needs to be expanded to the value of $name.
#
#NOTE: Currently this will NOT cope with cross references (so, if in the above example $name also contains a variable
#then that variable may or may not be expanded before the synopsis field is processed)
#
#
#=cut
#
sub _expand_vars
{
my $this = shift ;
# Get hash of fields
my %fields = $this->vars() ;
print "_expand_vars()\n" if $this->{'debug'}>=2 ;
# work through each field, create a list of those that have changed
my %changed ;
foreach my $field (sort keys %fields)
{
lib/App/Framework/Lite.pm view on Meta::CPAN
(\w+) # find a "word" and store it in $1
\}{0,1} # optional brace
}{
no strict 'refs'; # for $$1 below
if (defined $fields{$1}) {
$fields{$1}; # expand global variables only
} else {
"\${$1}"; # leave it
}
}egx;
lib/App/Framework/Lite.pm view on Meta::CPAN
if (keys %changed)
{
$this->set(%changed) ;
}
print "_expand_vars() - done\n" if $this->{'debug'}>=2 ;
}
#----------------------------------------------------------------------------
#
#=item B<_expand_args()>
#
#Expand any variables in the args
#
#=cut
#
sub _expand_args
{
my $this = shift ;
my $args_href = $this->{_args} ;
my $args_names_href = $this->{_arg_names_hash} ;
lib/App/Framework/Lite.pm view on Meta::CPAN
# my %opt_vars = $app->options() ;
# push @vars, \%opt_vars ;
# }
# push @vars, \%ENV ;
# ## expand
# $this->expand_keys(\%values, \@vars) ;
## Update
foreach my $arg (keys %$args_names_href)
{
$args_href->{$arg} = $values{$arg} if defined($args_href->{$arg}) ;
lib/App/Framework/Lite.pm view on Meta::CPAN
#============================================================================================
#----------------------------------------------------------------------------
=item B<expand_keys($hash_ref, $vars_aref)>
Processes all of the HASH values, replacing any variables with their contents. The variable
values are taken from the ARRAY ref I<$vars_aref>, which is an array of hashes. Each hash
containing variable name / variable value pairs.
The HASH values being expanded can be either scalar, or an ARRAY ref. In the case of the ARRAY ref each
ARRAY entry must be a scalar (e.g. an array of file lines).
=cut
sub expand_keys
{
my $this = shift ;
my ($hash_ref, $vars_aref, $_state_href, $_to_expand) = @_ ;
print "expand_keys($hash_ref, $vars_aref)\n" if $this->{debug};
$this->prt_data("vars=", $vars_aref, "hash=", $hash_ref) if $this->{debug} ;
my %to_expand = $_to_expand ? (%$_to_expand) : (%$hash_ref) ;
if (!$_state_href)
{
## Top-level
my %data_ref ;
# create state HASH
$_state_href = {} ;
# scan through hash looking for variables
%to_expand = () ;
foreach my $key (keys %$hash_ref)
{
my @vals ;
if (ref($hash_ref->{$key}) eq 'ARRAY')
{
lib/App/Framework/Lite.pm view on Meta::CPAN
$_state_href->{$key} = $data_ref{"$ref"} ;
}
else
{
print " + new state key=$key\n" if $this->{debug}>=2;
my $state = 'expanded' ;
$_state_href->{$key} = \$state ;
}
# save data reference
$data_ref{"$ref"} = $_state_href->{$key} if $ref ;
lib/App/Framework/Lite.pm view on Meta::CPAN
print " + + val=$val\n" if $this->{debug}>=2;
if (index($val, '$') >= 0)
{
print " + + + needs expanding\n" if $this->{debug}>=2;
$to_expand{$key}++ ;
${$_state_href->{$key}} = 'to_expand' ;
last ;
}
}
}
}
$this->prt_data("to expand=", \%to_expand) if $this->{debug};
$this->prt_data("Hash=", $hash_ref) if $this->{debug};
## Expand them
foreach my $key (keys %to_expand)
{
print " # Key=$key State=${$_state_href->{$key}}\n" if $this->{debug};
# skip if not valid (if called recursively with a variable that is not in the hash)
next unless exists($hash_ref->{$key}) ;
# Do replacement iff required
next if ${$_state_href->{$key}} eq 'expanded' ;
my @vals ;
if (ref($hash_ref->{$key}) eq 'ARRAY')
{
foreach my $val (@{$hash_ref->{$key}})
lib/App/Framework/Lite.pm view on Meta::CPAN
elsif (!ref($hash_ref->{$key}))
{
push @vals, \$hash_ref->{$key} ;
}
# mark as expanding
${$_state_href->{$key}} = 'expanding' ;
$this->prt_data("Vals to expand=", \@vals) if $this->{debug};
#use re 'debugcolor' ;
foreach my $val_ref (@vals)
{
lib/App/Framework/Lite.pm view on Meta::CPAN
{
## use current HASH values before vars
if (defined $hash_ref->{$var})
{
print " ## var=$var current state=${$_state_href->{$var}}\n" if $this->{debug};
if (${$_state_href->{$var}} eq 'to_expand')
{
print " ## var=$var call expand..\n" if $this->{debug};
# go expand it first
$this->expand_keys($hash_ref, $vars_aref, $_state_href, {$var => 1}) ;
}
if (${$_state_href->{$var}} eq 'expanded')
{
print " ## var=$var already expanded\n" if $this->{debug};
$replace = $hash_ref->{$var}; # expand variable
$replace = join("\n", @{$hash_ref->{$var}}) if (ref($hash_ref->{$var}) eq 'ARRAY') ;
}
}
print " ## var=$var can replace from hash=$replace\n" if $this->{debug};
lib/App/Framework/Lite.pm view on Meta::CPAN
## use vars
foreach my $href (@$vars_aref)
{
if (defined $href->{$var})
{
$replace = $href->{$var}; # expand variable
$replace = join("\n", @{$hash_ref->{$var}}) if (ref($href->{$var}) eq 'ARRAY') ;
print " ## found var=$var replace=$replace\n" if $this->{debug};
last ;
}
}
lib/App/Framework/Lite.pm view on Meta::CPAN
}egxm; ## NOTE: /m is for multiline anchors; /s is for multiline dots
}
$this->prt_data("Hash now=", $hash_ref) if $this->{debug}>=2;
# mark as expanded
${$_state_href->{$key}} = 'expanded' ;
$this->prt_data("State now=", $_state_href) if $this->{debug}>=2;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Framework.pm view on Meta::CPAN
This should be a single line, concise summary of what the script does. It's used in the terse man page created by pod2man.
=head4 Description
As you'd expect, this should be a full description, user-guide etc. on what the script does and how to do it. Notice that this example
has used one (of many) of the variables available: $name (which expands to the script name, without any path or extension).
=head4 Options
Command line options are defined in this section in the format:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/FuguVM/Config.pm view on Meta::CPAN
# project root itself can be relative, from a --project option,
# and a daemonized child can read the path from an other working
# directory.
sub _resolve_path ( $self, $value )
{
my $path = Fugu::File->expand_tilde($value);
$path = "$self->{project_root}/$path" if $path !~ m{^/};
require File::Spec;
return File::Spec->rel2abs($path);
}
lib/App/FuguVM/Config.pm view on Meta::CPAN
sub cache_dir ($self)
{
my $dir = $self->_setting('cache_dir') // '~/.cache/fuguvm';
return Fugu::File->expand_tilde($dir);
}
# $self->image_cache:
# Return whether 'fuguvm up' may use the installed-image cache.
# The project configuration wins over the global one. The default
lib/App/FuguVM/Config.pm view on Meta::CPAN
return $self->_bool( $value, 1 );
}
# $self->signify_dir:
# Return the resolved directory of the signify public keys, or
# undef without the directive. A leading tilde expands, and a
# relative path resolves against the project root.
sub signify_dir ($self)
{
my $dir = $self->_setting('signify_dir');
return if !defined $dir;
view all matches for this distribution
view release on metacpan or search on metacpan
share/sample0.txt view on Meta::CPAN
tickseed raucities letterspace schillers catalexes cobwebbing saltcellars shelling figs backsplashes acidimetries winy ingenuity singlenesses prenominates excursion waxily propping disgustingly liras gunstocks delusory legatee wine boyhood emotionles...
agger diabolisms preluded whetter subpopulation crock yelled misstating noncorrelation lar bulgur forebodies leotard duellers defogged dript tapelike researching scats whiskies blunderingly changers tardyon hemin superbillionaire rate caissons hetero...
staggerers salicin glaciating balefully outwasting outputted glazings airfare fictional untruest spectrogram replacing neuroses fluorination nasty windblasts hirselled novercal nonpayment autoeciously huffish guaranteed scalawag dodecagon instincts f...
napes yardbird cabaret calendula percolating lambaste dimensions grig scrubbers portably lysogenizing overprescriptions dupping hocused neologisms catamenial balconies carnalities subcurative encyclopedist fashioned cella osteomalacia packability shi...
enfeeblements beneficiated isobaric hooknose revolting anoas satang fliers feoffors wyte pyelitis rangier professorships supples exogamies scabbiest scintillators defensibly egalites myelitis hyperparasitisms locomotory zealousnesses inanimatenesses ...
fogey elytra misspell luxe shacks abatis unassumingness adman theorbo objectionablenesses parsecs casimere anastrophe angerless bifurcated exilic gesturer hydatid expands processor infester anosmia typhlosoles cavorting chowtimes crinolines repartiti...
ointment swiping hardness bask carnitine inconclusiveness porphyry hominoids headsail pasting grandioseness franchises smallholder beliquored lieutenants mumm epilimnion seesawing rete whippy thoracal proprietorship perfectivity fingernails gullible ...
allophane objectification sris infolder declare deplane psychasthenias terminus vizards antitype pretrimmed convocational transnationalism pasta outermost scolloping egers formulating trisomes shoebills allosauruses bewearied ashing campfire crumbs f...
gargety assiduity relumes hopper denotements pipette dualizing swaggies prescored trades repress latently kymographs sectorial bryophyte merchandized proneness straggling hoagies nictitated spectrofluorometry photographer impertinencies malodorously ...
bubinga denaturalizes laigh heathenism comelinesses dividers ropable salaams ken marplot tortrixes enterers budgerigars directness aestivate pyrogens overlook turbidimetry winker windowed soundboards foaled hyperglycemias overbalancing batholithic ea...
synthesizer stripling abiogeneses amoebiases commanded fulcrum reluming newish percipient phlebography unrated acupressures caput menstruates clairvoyantly ionization microtome discontinuation writes perkiness bongoists conduciveness professorates ti...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GHGen/Fixer.pm view on Meta::CPAN
sub add_trigger_filters($workflow) {
my $on = $workflow->{on} or return 0;
my $modified = 0;
# If 'on' is just 'push', expand it
if (ref $on eq 'ARRAY' && grep { $_ eq 'push' } @$on) {
$workflow->{on} = {
push => {
branches => ['main', 'master'],
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GUI/Cellgraph.pm view on Meta::CPAN
=head1 DESCRIPTION
This graphical application uses cellular automata logic, as described in
I<Steve Wolfram>s book I<"A new kind of science">, to paint tiled pictures.
Although, the original concept got expanded by many additional options
and functionalities.
It is meant for B<fun>, leasure, B<beautiful>, personalized images
and a deeper B<understanding> about how cellular automatons work.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GUI/Harmonograph/Frame.pm view on Meta::CPAN
}
sub inc_base_counter {
my ($self, $type) = @_;
my $dir = $self->{'config'}->get_value('file_base_dir');
$dir = App::GUI::Harmonograph::Settings::expand_path( $dir );
my $base = File::Spec->catfile( $dir, $self->{'config'}->get_value('file_base_name') );
my $cc = $self->{'config'}->get_value('file_base_counter');
while (1){
last unless -e $base.'_'.$cc.'.svg'
or -e $base.'_'.$cc.'.png'
lib/App/GUI/Harmonograph/Frame.pm view on Meta::CPAN
}
sub base_path {
my ($self) = @_;
my $dir = $self->{'config'}->get_value('file_base_dir');
$dir = App::GUI::Harmonograph::Settings::expand_path( $dir );
File::Spec->catfile( $dir, $self->{'config'}->get_value('file_base_name') )
.'_'.$self->{'config'}->get_value('file_base_counter');
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GUI/Juliagraph/Settings.pm view on Meta::CPAN
use File::Spec;
sub load {
my ($file) = @_;
return unless defined $file;
$file = expand_path( $file );
my $data = {};
open my $FH, '<', $file or return "could not read $file: $!";
my $cat = '';
while (<$FH>) {
chomp;
lib/App/GUI/Juliagraph/Settings.pm view on Meta::CPAN
$i = index($path, $ENV{HOME} );
$path = '~' . substr( $path, length $ENV{HOME}) if $i > -1;
$path;
}
sub expand_path {
my ($path) = @_;
$path = File::Spec->catdir( $FindBin::Bin, substr( $path, 1) ) if substr($path, 0,1) eq '.';
$path = File::Spec->catdir( $ENV{HOME}, substr( $path, 1) ) if substr($path, 0,1) eq '~';
$path;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
MY::preinstall( $pkg, $ver ) or next if defined &MY::preinstall;
print "*** Installing $pkg...\n";
my $obj = CPAN::Shell->expand( Module => $pkg );
my $success = 0;
if ( $obj and defined( _version_check( $obj->cpan_version, $ver ) ) ) {
my $pathname = $pkg;
$pathname =~ s/::/\\W/;
view all matches for this distribution
view release on metacpan or search on metacpan
"Data::Sah::Compiler::perl::TH::hash" : "0.914",
"Data::Sah::Compiler::perl::TH::int" : "0.914",
"Data::Sah::Compiler::perl::TH::obj" : "0.914",
"Data::Sah::Compiler::perl::TH::re" : "0.914",
"Data::Sah::Compiler::perl::TH::str" : "0.914",
"Data::Sah::Filter::perl::Path::expand_tilde_when_on_unix" : "0",
"Data::Sah::Filter::perl::Path::strip_slashes_when_on_unix" : "0",
"Exporter" : "5.57",
"File::Slurper" : "0",
"File::Temp" : "0.2307",
"Log::ger" : "0.038",
view all matches for this distribution
view release on metacpan or search on metacpan
"Data::Sah::Compiler::perl::TH::bool" : "0",
"Data::Sah::Compiler::perl::TH::hash" : "0",
"Data::Sah::Compiler::perl::TH::obj" : "0",
"Data::Sah::Compiler::perl::TH::re" : "0",
"Data::Sah::Compiler::perl::TH::str" : "0",
"Data::Sah::Filter::perl::Path::expand_tilde_when_on_unix" : "0",
"Data::Sah::Filter::perl::Path::strip_slashes_when_on_unix" : "0",
"Perinci::CmdLine::Any" : "0",
"Perinci::CmdLine::Gen" : "0.496",
"Sah::Schema::filename" : "0",
"Sah::Schema::perl::modname" : "0",
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-id view on Meta::CPAN
#$SPEC{':package'} = {
# v => 1.1,
# summary => 'Completion routines for bash shell',
#};
#
#sub _expand_tilde {
# my ($user, $slash) = @_;
# my @ent;
# if (length $user) {
# @ent = getpwnam($user);
# } else {
script/_genpass-id view on Meta::CPAN
#
# $word =~ s!^(~)(\w*)(/|\z) | # 1) tilde 2) username 3) optional slash
# \\(.) | # 4) escaped char
# \$(\w+) # 5) variable name
# !
# $1 ? (not($after_ws) || $is_cur_word ? "$1$2$3" : _expand_tilde($2, $3)) :
# $4 ? $4 :
# ($is_cur_word ? "\$$5" : $ENV{$5})
# !egx;
# $word;
#}
script/_genpass-id view on Meta::CPAN
# for the current word (`COMP_WORDS[COMP_CWORD]`) (bash does not perform
# variable substitution for `COMP_WORDS`). However, note that special shell
# variables that are not environment variables like `$0`, `$_`, `$IFS` will not
# be replaced correctly because bash does not export those variables for us.
#
#4) tildes (`~`) are expanded with user's home directory except for the current
# word (bash does not perform tilde expansion for `COMP_WORDS`);
#
#Caveats:
#
#* Like bash, we group non-whitespace word-breaking characters into its own word.
script/_genpass-id view on Meta::CPAN
# equivalent:
#
# % cmd --foo=bar
# % cmd --foo = bar
#
#Because they both expand to `['--foo', '=', 'bar']`. But obviously
#<pm:Getopt::Long> does not regard the two as equivalent.
#
#_
# args_as => 'array',
# args => {
script/_genpass-id view on Meta::CPAN
# path_sep=>'/'};
# RETURN_RES:
# $fres;
#}
#
#sub _expand1 {
# my ($opt, $opts) = @_;
# my @candidates;
# my $is_hash = ref($opts) eq 'HASH';
# for ($is_hash ? (sort {length($a)<=>length($b)} keys %$opts) : @$opts) {
# next unless index($_, $opt) == 0;
script/_genpass-id view on Meta::CPAN
# } else {
# push @inswords, $opt;
# $j++;
# }
#
# my $expand;
# if (length $rest) {
# $expand++;
# $expects[$j > $i ? $j+1 : $j+2]{do_complete_optname} = 0;
# $expects[$j > $i ? $j+1 : $j+2]{optval} = $opt;
# } else {
# $expects[$j > $i ? $j-1 : $j]{optname} = $opt;
# $expects[$j > $i ? $j-1 : $j]{comp_result} = [
script/_genpass-id view on Meta::CPAN
#
# if ($rest =~ s/\A=//) {
# $encounter_equal_sign++;
# }
#
# if ($expand) {
# push @inswords, "=", $rest;
# $j+=2;
# }
# last EXPAND;
# }
script/_genpass-id view on Meta::CPAN
# $cword += 2 if $cword >= $i;
# }
# }
#
# my $opt = $word;
# my $opthash = _expand1($opt, \%opts);
#
# if ($opthash) {
# $opt = $opthash->{name};
# $expects[$i]{optname} = $opt;
# my $nth = $seen_opts{$opt} // 0;
script/_genpass-id view on Meta::CPAN
# description => <<'_',
#
#Complete path, for anything path-like. Meant to be used as backend for other
#functions like `Complete::File::complete_file` or
#`Complete::Module::complete_module`. Provides features like case-insensitive
#matching, expanding intermediate paths, and case mapping.
#
#Algorithm is to split path into path elements, then list items (using the
#supplied `list_func`) and perform filtering (using the supplied `filter_func`)
#at every level.
#
script/_genpass-id view on Meta::CPAN
# (?<!\\)(?:\\\\)*\}
# )
# |
# # non-escaped brace expression, to catch * or ? or [...] inside so
# # they don't go to below pattern, because bash doesn't consider them
# # wildcards, e.g. '/{et?,us*}' expands to '/etc /usr', but '/{et?}'
# # doesn't expand at all to /etc.
# (?P<braceno>
# (?<!\\)(?:\\\\)*\{
# (?: \\\\ | \\\{ | \\\} | [^\\\{\}] )*
# (?<!\\)(?:\\\\)*\}
# )
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-wordlist view on Meta::CPAN
#$SPEC{':package'} = {
# v => 1.1,
# summary => 'Completion routines for bash shell',
#};
#
#sub _expand_tilde {
# my ($user, $slash) = @_;
# my @ent;
# if (length $user) {
# @ent = getpwnam($user);
# } else {
script/_genpass-wordlist view on Meta::CPAN
#
# $word =~ s!^(~)(\w*)(/|\z) | # 1) tilde 2) username 3) optional slash
# \\(.) | # 4) escaped char
# \$(\w+) # 5) variable name
# !
# $1 ? (not($after_ws) || $is_cur_word ? "$1$2$3" : _expand_tilde($2, $3)) :
# $4 ? $4 :
# ($is_cur_word ? "\$$5" : $ENV{$5})
# !egx;
# $word;
#}
script/_genpass-wordlist view on Meta::CPAN
# for the current word (`COMP_WORDS[COMP_CWORD]`) (bash does not perform
# variable substitution for `COMP_WORDS`). However, note that special shell
# variables that are not environment variables like `$0`, `$_`, `$IFS` will not
# be replaced correctly because bash does not export those variables for us.
#
#4) tildes (`~`) are expanded with user's home directory except for the current
# word (bash does not perform tilde expansion for `COMP_WORDS`);
#
#Caveats:
#
#* Like bash, we group non-whitespace word-breaking characters into its own word.
script/_genpass-wordlist view on Meta::CPAN
# equivalent:
#
# % cmd --foo=bar
# % cmd --foo = bar
#
#Because they both expand to `['--foo', '=', 'bar']`. But obviously
#<pm:Getopt::Long> does not regard the two as equivalent.
#
#_
# args_as => 'array',
# args => {
script/_genpass-wordlist view on Meta::CPAN
# path_sep=>'/'};
# RETURN_RES:
# $fres;
#}
#
#sub _expand1 {
# my ($opt, $opts) = @_;
# my @candidates;
# my $is_hash = ref($opts) eq 'HASH';
# for ($is_hash ? (sort {length($a)<=>length($b)} keys %$opts) : @$opts) {
# next unless index($_, $opt) == 0;
script/_genpass-wordlist view on Meta::CPAN
# } else {
# push @inswords, $opt;
# $j++;
# }
#
# my $expand;
# if (length $rest) {
# $expand++;
# $expects[$j > $i ? $j+1 : $j+2]{do_complete_optname} = 0;
# $expects[$j > $i ? $j+1 : $j+2]{optval} = $opt;
# } else {
# $expects[$j > $i ? $j-1 : $j]{optname} = $opt;
# $expects[$j > $i ? $j-1 : $j]{comp_result} = [
script/_genpass-wordlist view on Meta::CPAN
#
# if ($rest =~ s/\A=//) {
# $encounter_equal_sign++;
# }
#
# if ($expand) {
# push @inswords, "=", $rest;
# $j+=2;
# }
# last EXPAND;
# }
script/_genpass-wordlist view on Meta::CPAN
# $cword += 2 if $cword >= $i;
# }
# }
#
# my $opt = $word;
# my $opthash = _expand1($opt, \%opts);
#
# if ($opthash) {
# $opt = $opthash->{name};
# $expects[$i]{optname} = $opt;
# my $nth = $seen_opts{$opt} // 0;
script/_genpass-wordlist view on Meta::CPAN
# description => <<'_',
#
#Complete path, for anything path-like. Meant to be used as backend for other
#functions like `Complete::File::complete_file` or
#`Complete::Module::complete_module`. Provides features like case-insensitive
#matching, expanding intermediate paths, and case mapping.
#
#Algorithm is to split path into path elements, then list items (using the
#supplied `list_func`) and perform filtering (using the supplied `filter_func`)
#at every level.
#
script/_genpass-wordlist view on Meta::CPAN
# (?<!\\)(?:\\\\)*\}
# )
# |
# # non-escaped brace expression, to catch * or ? or [...] inside so
# # they don't go to below pattern, because bash doesn't consider them
# # wildcards, e.g. '/{et?,us*}' expands to '/etc /usr', but '/{et?}'
# # doesn't expand at all to /etc.
# (?P<braceno>
# (?<!\\)(?:\\\\)*\{
# (?: \\\\ | \\\{ | \\\} | [^\\\{\}] )*
# (?<!\\)(?:\\\\)*\}
# )
view all matches for this distribution
view release on metacpan or search on metacpan
Added check that set data is all used (Ivan Wills)
Split test logic to own module (Ivan Wills)
Converted branch-clean (Ivan Wills)
Added test for multiple branches (Ivan Wills)
Changed the test data to be clearer, added new test with inputs (Ivan Wills)
Greatly expanded tests (Ivan Wills)
changed get_options to return true if all went ok false otherwise (Ivan Wills)
Converted jira (Ivan Wills)
Converted committers (Ivan Wills)
Converted branch-grep (Ivan Wills)
Added tests for git-tag-grep (Ivan Wills)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitGot/Command.pm view on Meta::CPAN
my ( $self ) = @_;
return $self->full_repo_list
if $self->all or ! $self->tags and ! $self->skip_tags and ! @{ $self->args };
my $list = _expand_arg_list( $self->args );
my @repos;
REPO: foreach my $repo ( $self->all_repos ) {
if ( grep { $_ eq $repo->number or $_ eq $repo->name } @$list ) {
push @repos, $repo;
lib/App/GitGot/Command.pm view on Meta::CPAN
map { $_->in_writable_format } $self->all_repos
] ,
);
}
sub _expand_arg_list {
my $args = shift;
## no critic
return [
view all matches for this distribution
view release on metacpan or search on metacpan
"Data::Sah::Coerce::perl::To_float::From_str::percent" : "0",
"Data::Sah::Coerce::perl::To_float::From_str::suffix_datasize" : "0",
"Data::Sah::Compiler::perl::TH::bool" : "0.914",
"Data::Sah::Compiler::perl::TH::float" : "0.914",
"Data::Sah::Compiler::perl::TH::str" : "0.914",
"Data::Sah::Filter::perl::Path::expand_tilde_when_on_unix" : "0",
"Data::Sah::Filter::perl::Path::strip_slashes_when_on_unix" : "0",
"File::Find" : "0",
"File::chdir" : "0",
"Getopt::Long" : "2.50",
"IPC::System::Options" : "0.339",
view all matches for this distribution
view release on metacpan or search on metacpan
This is a howto document to show you the process of setting up GITC from the
beginning with RT. You can alter it for your relevant ticketing system.
This document assumes that you already have a working ticketing system, a
working install of GIT, and have git pull-ed or downloaded and expanded an
archive of gitc in the 'gitc' directory.
Begin by editing gitc.config. In this file, you will specify the various
statuses tickets will be put in by gitc, as well as the user lookup method.
view all matches for this distribution
view release on metacpan or search on metacpan
"requires" : {
"Chart::Gnuplot" : "0",
"Data::Sah::Compiler::perl::TH::array" : "0.914",
"Data::Sah::Compiler::perl::TH::bool" : "0.914",
"Data::Sah::Compiler::perl::TH::str" : "0.914",
"Data::Sah::Filter::perl::Path::expand_tilde_when_on_unix" : "0",
"Data::Sah::Filter::perl::Path::strip_slashes_when_on_unix" : "0",
"Desktop::Open" : "0.004",
"File::Slurper::Dash" : "0",
"File::Temp" : "0.2307",
"Log::ger" : "0.038",
view all matches for this distribution
view release on metacpan or search on metacpan
},
"runtime" : {
"requires" : {
"App::QRCodeUtils" : "0",
"Data::Sah::Compiler::perl::TH::str" : "0.914",
"Data::Sah::Filter::perl::Path::expand_tilde_when_on_unix" : "0",
"Data::Sah::Filter::perl::Path::strip_slashes_when_on_unix" : "0",
"File::Which" : "0",
"Perinci::CmdLine::Any" : "0.154",
"Perinci::CmdLine::Lite" : "1.924",
"Sah::Schema::filename" : "0",
view all matches for this distribution
view release on metacpan or search on metacpan
"Data::Sah::Compiler::perl::TH::array" : "0.914",
"Data::Sah::Compiler::perl::TH::date" : "0.914",
"Data::Sah::Compiler::perl::TH::duration" : "0.914",
"Data::Sah::Compiler::perl::TH::int" : "0.914",
"Data::Sah::Compiler::perl::TH::str" : "0.914",
"Data::Sah::Filter::perl::Path::expand_tilde_when_on_unix" : "0",
"Data::Sah::Filter::perl::Path::strip_slashes_when_on_unix" : "0",
"File::Slurper" : "0",
"File::Slurper::Dash" : "0",
"HTML::Entities" : "0",
"Log::ger" : "0.038",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Grepl.pm view on Meta::CPAN
grepl --dir lib/ --pattern '(?i:XXX)' --search comments
See C<perldoc grepl> for more examples of that interface.
See L<Allowed Tokens> for what you can search through. This will be expanded
as time goes on. Patches very welcome.
=head1 METHODS
=head2 Class Methods
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/annotate.pm view on Meta::CPAN
$config->deal_with($argv,
map(optspec($_), keys %{$config}));
}
use Text::ANSI::Fold::Util qw(ansi_width);
Text::ANSI::Fold->configure(expand => 1);
*vwidth = \&ansi_width;
package # no_index
Local::Annon {
use strict;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/frame.pm view on Meta::CPAN
option --set-frame-width &set(width=$<shift>)
option --set-frame-column &set(column=$<shift>)
option --ansifold-with-width \
--pf "ansifold --expand --discard=EL --padding --prefix ' â ' $<shift> --width=$<shift>"
option --ansifold \
--ansifold-with-width &get(fold,width)
option --frame-color-filename \
lib/App/Greple/frame.pm view on Meta::CPAN
define @COL_WIDTH @TEXT_WIDTH:@LINE_FIELD:+:@FRAME_GAP:+
define @COLUMN @COL_WIDTH:/:INT:DUP:1:GE:EXCH:1:IF
define @WIDTH DUP:@COLUMN:/:@FRAME_GAP:-:@MARGIN:-
define $FOLD \
ansifold --expand --discard=EL --padding \
--width =@WIDTH \
--prefix ' â ' \
--boundary=$ENV{GREPLE_FRAME_PAGES_BOUNDARY} \
--linebreak=all --runin=@MARGIN --runout=@MARGIN
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/md.pm view on Meta::CPAN
}
# Handle + prefix: prepend current color value before load_params
# (load_params' built-in + doesn't work correctly with sub{...})
my @final_cm;
for my $entry (@opt_cm) {
my $expanded = $entry =~ s/\$\{base_name\}/$base_name/gr
=~ s/\$\{base\}/$base/gr;
if ($expanded =~ /^(\w+)=\+(.*)/) {
my ($label, $append) = ($1, $2);
my $current = $colors{$label} // '';
push @final_cm, "$label=$current$append";
} else {
push @final_cm, $expanded;
}
}
$cm = Getopt::EX::Colormap->new(
HASH => \%colors,
view all matches for this distribution
view release on metacpan or search on metacpan
share/ms-style-guide.pl view on Meta::CPAN
<p>ãé·é³è¨å·ã®æç¡ã«ãã表è¨ã®æºãã¯ãèªæ«ã ãã§ãªãæä¸ã«ãããããä»åã®å¤æ´ã¯èªæ«ã«éãã¨ãããä¾ãã°ä»åã®å¤æ´ã§ããããã¡ããããããã¡ã¼ãã¨æ¸ãããã«ãªã£ãããã...
<p>ãéå»ã«åºè·ãã製åã«ã¤ãã¦ã¯ã徿¥éãã¨ãã¦ä»å¾ãªãªã¼ã¹ãã製åãããã¥ã¡ã³ããæ°ã«ã¼ã«é©ç¨ã®å¯¾è±¡ã¨ãããæåã®å¯¾è±¡è£½åã¨ãªãã®ã¯8æä¸ã«äºå®ããã¦ããInternet Explorer ...
<p>ãå社ã¯7æ25æ¥ãã<A HREF="http://www.microsoft.com/language/ja/jp/default.mspx">Webãµã¤ã</A>ãéãã¦å¤æ´å¯¾è±¡ã¨ãªãèªå½ãªã¹ããå«ãã ã¹ã¿ã¤ã«ã¬ã¤ãã®æä¾ãéå§ããããã¢ã¦ããã¢ããã³ã³ã...
<p>ããã¤ã¯ãã½ãã製åã§ããXboxãªã©ä¸è¬åãã«åºè·ãã¦ãã製åã§ã¯ãä¾ãã°ãã³ã³ããã¼ã©ã¼ãã¨è¡¨è¨ãã¦ãããããããã¾ã§ã©ãã夿´ã¯ãªãã</p>
<p>â é·é³è¨å·ä»ãã«å¤æ´ã¨ãªããã®</p>
<p>ã¢ã¯ã»ãµã¼ï¼accessorï¼ãã¢ã¯ã¿ã¼ï¼actorï¼ãã¢ã¯ãã£ãã¼ã¿ã¼ï¼activatorï¼ãã¢ã°ãªã²ã¼ã¿ã¼ï¼aggregatorï¼ãã¢ã»ã³ãã©ã¼ï¼assemblerï¼ãã¢ããã¿ã¼ï¼adapterï¼ãã¢ãããã¼ã¿ã¼ï¼updaterï¼ãã¢...
<p>â æ
£ä¾ã«åºã¥ã夿´ããªããã®</p>
<p>ã¢ã¦ããã¢ï¼outdoorï¼ãã¢ã¯ã»ã©ã¬ã¼ã¿ï¼acceleratorï¼ãã¤ã³ããªã¢ï¼interiorï¼ãã¤ã³ãã¢ï¼indoorï¼ãã¨ã¯ã¹ããªã¢ï¼exteriorï¼ãã¨ã³ã¸ãã¢ï¼engineerï¼ãã®ã¢ï¼gearï¼ããã£ãªã¢ï¼carrierï¼ãã...
<p>â ãã¨ãã¨é·é³ãä»ãã¦ãã¦å¤æ´ã®ãªããã®</p>
<p>ã¢ã¼ãã£ã¼ï¼archerï¼ãã¢ã¦ã¿ã¼ï¼outerï¼ãã¢ã¦ããã¼ï¼outlawï¼ãã¢ã«ããã¼ï¼academyï¼ãã¢ã¹ãã¼ï¼ASCIIï¼ãã¢ããã¼ï¼upperï¼ãã¢ããã³ãã£ã¼ï¼adventureï¼ãã¢ãã¥ãã¼ï¼anubarï¼ãã¢ãã¿...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/tee/Autoload.pm view on Meta::CPAN
=over 4
=item B<resolve>(I<name>)
Resolve a function name and return a code reference. If the name is
a short alias (like C<ansicolumn>), it is expanded to the full name
(C<App::ansicolumn::ansicolumn>). The module is loaded if necessary.
=back
=head1 ALIASES
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/under.pm view on Meta::CPAN
exit 0;
}
}
$Term::ANSIColor::Concise::NO_RESET_EL = 1;
Text::ANSI::Fold->configure(expand => 1);
my %marks = (
eighth => [ "\N{UPPER ONE EIGHTH BLOCK}" ],
half => [ "\N{UPPER HALF BLOCK}" ],
overline => [ "\N{OVERLINE}" ],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/update.pm view on Meta::CPAN
option default \
--prologue update_initialize \
--begin update_begin
expand ++dump --all -h --color=never --no-newline --no-line-number
option --update::diff ++dump --of &update_diff
option --update::create ++dump --begin update_divert --end update_file() --update-suffix=.new
option --update::update ++dump --begin update_divert --end update_file(replace)
option --update::discard --begin update_divert --end update_file(discard)
view all matches for this distribution
view release on metacpan or search on metacpan
- This is mandatory for proper file handling and to avoid issues with text processing tools, git, and other utilities
- Before finalizing any file operation, verify the content ends with '\n'
## Coding Style
- **Never use tab characters for indentation** â indent with spaces only
(the codebase was fully de-tabbed in 2026-07; former tabs were expanded
at 8-column stops)
- The only exception is Makefiles (`share/XLATE.mk`, `i18n/Makefile`,
`examples/Makefile`, etc.), where make syntax requires tabs
## Important Behavior Guidelines
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/dig.pm view on Meta::CPAN
##
## directories
##
expand is_repository ( -name .git -o -name .svn -o -name RCS -o -name CVS )
expand is_environment ( -name .vscode )
expand is_temporary ( -name .build -o -name _build )
expand is_hugo_gen ( -path */resources/_gen )
expand is_artifacts ( -name node_modules )
##
## files
##
expand is_dots -name .*
expand is_version -name *,v
expand is_backup ( -name *~ -o -name *.swp )
expand is_image ( -iname *.jpg -o -iname *.jpeg -o \
-iname *.gif -o -iname *.png -o \
-iname *.ico -o \
-iname *.heic -o -iname *.heif -o \
-iname *.svg -o \
-iname *.tif \
)
expand is_archive ( -iname *.tar -o -iname *.tar.gz -o -iname *.tbz -o -iname *.tgz -o \
-name *.a -o -name *.zip \
)
expand is_pdf -iname *.pdf
expand is_db ( -name *.db -o -iname *.bdb )
expand is_minimized ( -name *.min.js -o -name *.min.*.js -o \
-name *.min.css -o -name *.min.*.css )
expand is_others ( -name *.bundle -o -name *.dylib -o -name *.o -o \
-name *.fits )
option --dig -Mfind \
$<move> \
( \
view all matches for this distribution