view release on metacpan or search on metacpan
lib/Apigee/Edge.pm view on Meta::CPAN
use Carp;
use Mojo::UserAgent;
use Mojo::URL;
use Mojo::Util qw(b64_encode);
use URI::Escape qw/uri_escape/;
use vars qw/$errstr/;
sub errstr { return $errstr }
sub new { ## no critic (ArgUnpacking)
lib/Apigee/Edge.pm view on Meta::CPAN
return $self->request('GET', "/o/" . $self->{org} . "/apps/$app_id");
}
sub get_apps_by_family {
my ($self, $family) = @_;
return $self->request('GET', "/o/" . $self->{org} . "/apps?appfamily=" . uri_escape($family));
}
sub get_apps_by_keystatus {
my ($self, $keystatus) = @_;
return $self->request('GET', "/o/" . $self->{org} . "/apps?keyStatus=" . uri_escape($keystatus));
}
sub get_apps_by_type {
my ($self, $type) = @_;
return $self->request('GET', "/o/" . $self->{org} . "/apps?apptype=" . uri_escape($type));
}
sub get_apps { ## no critic (ArgUnpacking)
my $self = shift;
my %args = @_ % 2 ? %{$_[0]} : @_;
lib/Apigee/Edge.pm view on Meta::CPAN
}
sub get_developer {
my $self = shift;
my ($email) = @_;
return $self->request('GET', "/o/" . $self->{org} . "/developers/" . uri_escape($email));
}
sub delete_developer {
my $self = shift;
my ($email) = @_;
return $self->request('DELETE', "/o/" . $self->{org} . "/developers/" . uri_escape($email));
}
sub get_app_developers {
my $self = shift;
my ($app) = @_;
return $self->request('GET', "/o/" . $self->{org} . "/developers?app=" . uri_escape($app));
}
sub get_developers {
my $self = shift;
return $self->request('GET', "/o/" . $self->{org} . "/developers");
}
sub set_developer_status {
my ($self, $email, $status);
return $self->request('GET', "/o/" . $self->{org} . "/developers/" . uri_escape($email) . "?action=" . uri_escape($status));
}
sub update_developer { ## no critic (ArgUnpacking)
my $self = shift;
my $email = shift;
my %args = @_ % 2 ? %{$_[0]} : @_;
$email or croak "email is required.";
return $self->request('PUT', "/o/" . $self->{org} . "/developers/" . uri_escape($email), %args);
}
## Apps: Developer http://apigee.com/docs/api/apps-developer
sub change_app_status {
my ($self, $email, $app) = @_;
return $self->request('GET', "/o/" . $self->{org} . "/developers/" . uri_escape($email) . "/apps/" . uri_escape($app));
}
sub create_developer_app { ## no critic (ArgUnpacking)
my $self = shift;
my $email = shift;
my %args = @_ % 2 ? %{$_[0]} : @_;
return $self->request('POST', "/o/" . $self->{org} . "/developers/" . uri_escape($email) . "/apps", %args);
}
sub delete_developer_app {
my ($self, $email, $app) = @_;
return $self->request('DELETE', "/o/" . $self->{org} . "/developers/" . uri_escape($email) . "/apps/" . uri_escape($app));
}
sub get_developer_app {
my ($self, $email, $app) = @_;
return $self->request('GET', "/o/" . $self->{org} . "/developers/" . uri_escape($email) . "/apps/" . uri_escape($app));
}
sub get_developer_apps { ## no critic (ArgUnpacking)
my $self = shift;
my $email = shift;
$email or croak "email is required.";
my %args = @_ % 2 ? %{$_[0]} : @_;
my $url = Mojo::URL->new("/o/" . $self->{org} . "/developers/" . uri_escape($email) . "/apps");
$url->query(\%args) if %args;
return $self->request('GET', $url->to_string);
}
sub update_developer_app { ## no critic (ArgUnpacking)
lib/Apigee/Edge.pm view on Meta::CPAN
my $email = shift;
my $app = shift;
my %args = @_ % 2 ? %{$_[0]} : @_;
$email or croak "email is required.";
$app or croak "app is required.";
return $self->request('PUT', "/o/" . $self->{org} . "/developers/" . uri_escape($email) . "/apps/" . uri_escape($app), %args);
}
sub get_count_of_developer_app_resource {
my ($self, $email, $app, $entity) = @_;
return $self->request('GET',
"/o/"
. $self->{org}
. "/developers/"
. uri_escape($email)
. "/apps/"
. uri_escape($app)
. qq~?"query=count&entity=~
. uri_escape($entity)
. qq~"~);
}
sub regenerate_developer_app_key { ## no critic (ArgUnpacking)
my $self = shift;
my $email = shift;
my $app = shift;
my %args = @_ % 2 ? %{$_[0]} : @_;
$email or croak "email is required.";
$app or croak "app is required.";
return $self->request('POST', "/o/" . $self->{org} . "/developers/" . uri_escape($email) . "/apps/" . uri_escape($app), %args);
}
## API Products http://apigee.com/docs/api/api-products-1
sub create_api_product { ## no critic (ArgUnpacking)
my $self = shift;
lib/Apigee/Edge.pm view on Meta::CPAN
sub update_api_product { ## no critic (ArgUnpacking)
my $self = shift;
my $product = shift;
my %args = @_ % 2 ? %{$_[0]} : @_;
$product or croak "product is required.";
return $self->request('PUT', "/o/" . $self->{org} . "/apiproducts/" . uri_escape($product), %args);
}
sub delete_api_product {
my ($self, $product) = @_;
return $self->request('DELETE', "/o/" . $self->{org} . "/apiproducts/" . uri_escape($product));
}
sub get_api_product {
my ($self, $product) = @_;
return $self->request('GET', "/o/" . $self->{org} . "/apiproducts/" . uri_escape($product));
}
sub get_api_products { ## no critic (ArgUnpacking)
my $self = shift;
my %args = @_ % 2 ? %{$_[0]} : @_;
lib/Apigee/Edge.pm view on Meta::CPAN
sub get_api_product_details { ## no critic (ArgUnpacking)
my $self = shift;
my $product = shift;
my %args = @_ % 2 ? %{$_[0]} : @_;
my $url = Mojo::URL->new("/o/" . $self->{org} . "/apiproducts/" . uri_escape($product));
$url->query(\%args) if %args;
return $self->request('GET', $url->to_string);
}
sub request {
lib/Apigee/Edge.pm view on Meta::CPAN
=head2 request
The underlaying method to call Apigee when you see something is missing.
$self->request('GET', "/o/$org_name/apps/$app_id");
$self->request('DELETE', "/o/$org_name/developers/" . uri_escape($email));
$self->request('POST', "/o/$org_name/developers", %args);
$self->request('PUT', "/o/$org_name/developers/" . uri_escape($email), %args);
=head2 errstr
=head1 GITHUB
view all matches for this distribution
view release on metacpan or search on metacpan
script/rgb-to-ansi-bg-code view on Meta::CPAN
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Convert RGB to ANSI color escape sequence to change background color
# PODNAME: rgb-to-ansi-bg-code
__END__
=pod
=encoding UTF-8
=head1 NAME
rgb-to-ansi-bg-code - Convert RGB to ANSI color escape sequence to change background color
=head1 VERSION
This document describes version 0.011 of rgb-to-ansi-bg-code (from Perl distribution App-ANSIColorUtils), released on 2025-03-18.
view all matches for this distribution
view release on metacpan or search on metacpan
script/_acme-cpanauthors view on Meta::CPAN
# my ($word, $is_cur_word, $after_ws) = @_;
#
# #say "D:add_unquoted word=$word is_cur_word=$is_cur_word after_ws=$after_ws";
#
# $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})
script/_acme-cpanauthors view on Meta::CPAN
#sub _add_double_quoted {
# no warnings 'uninitialized';
#
# my ($word, $is_cur_word) = @_;
#
# $word =~ s!\\(.) | # 1) escaped char
# \$(\w+) # 2) variable name
# !
# $1 ? $1 :
# ($is_cur_word ? "\$$2" : $ENV{$2})
# !egx;
script/_acme-cpanauthors view on Meta::CPAN
#bash versions 4.2-4.3):
#
#1) quotes and backslashes are stripped (bash's `COMP_WORDS` contains all the
# quotes and backslashes);
#
#2) quoted phrase that contains spaces, or phrase that contains escaped spaces is
# parsed as a single word. For example:
#
# command "First argument" Second\ argument
#
# bash would split it as (represented as Perl):
script/_acme-cpanauthors view on Meta::CPAN
# # add things to words, etc
# local point=... # calculate the new point
# COMPREPLY=( `COMP_LINE="foo ${words[@]}" COMP_POINT=$point foo` )
# }
#
# To avoid these word-breaking characters to be split/grouped, we can escape
# them with backslash or quote them, e.g.:
#
# command "http://example.com:80" Foo\:\:Bar
#
# which bash will parse as:
script/_acme-cpanauthors view on Meta::CPAN
# v => 1.1,
# summary => 'Format completion for output (for shell)',
# description => <<'_',
#
#Bash accepts completion reply in the form of one entry per line to STDOUT. Some
#characters will need to be escaped. This function helps you do the formatting,
#with some options.
#
#This function accepts completion answer structure as described in the `Complete`
#POD. Aside from `words`, this function also recognizes these keys:
#
script/_acme-cpanauthors view on Meta::CPAN
# array.
#
#* esc_mode
#
# Escaping mode for entries. Either `default` (most nonalphanumeric characters
# will be escaped), `shellvar` (like `default`, but dollar sign `$` will also be
# escaped, convenient when completing environment variables for example),
# `filename` (currently equals to `default`), `option` (currently equals to
# `default`), or `none` (no escaping will be done).
#
#* word
#
script/_acme-cpanauthors view on Meta::CPAN
# ESCAPE_WORDS:
# for my $entry (@$words) {
# my $word = ref($entry) eq 'HASH' ? $entry->{word} : $entry;
# my $summary = (ref($entry) eq 'HASH' ? $entry->{summary} : undef) // '';
# if ($esc_mode eq 'shellvar') {
# # escape $ also
# $word =~ s!([^A-Za-z0-9,+._/:~-])!\\$1!g;
# } elsif ($esc_mode eq 'none') {
# # no escaping
# } else {
# # default
script/_acme-cpanauthors view on Meta::CPAN
# format_completion($completion, $opts) -> str|array
#
#Format completion for output (for shell).
#
#Bash accepts completion reply in the form of one entry per line to STDOUT. Some
#characters will need to be escaped. This function helps you do the formatting,
#with some options.
#
#This function accepts completion answer structure as described in the C<Complete>
#POD. Aside from C<words>, this function also recognizes these keys:
#
script/_acme-cpanauthors view on Meta::CPAN
#array.
#
#=item * esc_mode
#
#Escaping mode for entries. Either C<default> (most nonalphanumeric characters
#will be escaped), C<shellvar> (like C<default>, but dollar sign C<$> will also be
#escaped, convenient when completing environment variables for example),
#C<filename> (currently equals to C<default>), C<option> (currently equals to
#C<default>), or C<none> (no escaping will be done).
#
#=item * word
#
script/_acme-cpanauthors view on Meta::CPAN
#bash versions 4.2-4.3):
#
#1) quotes and backslashes are stripped (bash's C<COMP_WORDS> contains all the
# quotes and backslashes);
#
#2) quoted phrase that contains spaces, or phrase that contains escaped spaces is
# parsed as a single word. For example:
#
# command "First argument" Second\ argument
#
# bash would split it as (represented as Perl):
script/_acme-cpanauthors view on Meta::CPAN
# # add things to words, etc
# local point=... # calculate the new point
# COMPREPLY=( C<COMP_LINE="foo ${words[@]}" COMP_POINT=$point foo> )
#}
#
#To avoid these word-breaking characters to be split/grouped, we can escape
#them with backslash or quote them, e.g.:
#
#command "http://example.com:80" Foo\:\:Bar
#
#which bash will parse as:
script/_acme-cpanauthors view on Meta::CPAN
# modify_answer(answer=>$fres, suffix=>"=");
# $fres->{path_sep} = "=";
# # XXX actually not entirely correct, we want normal
# # escaping but without escaping "=", maybe we should
# # allow customizing, e.g. esc_mode=normal, dont_esc="="
# # (list of characters to not escape)
# $fres->{esc_mode} = "none";
# goto RETURN_RES;
# }
# } else {
# $fres = complete_arg_val(
script/_acme-cpanauthors view on Meta::CPAN
# )x;
#
## note: order is important here, brace encloses the other
#our $RE_WILDCARD_BASH =
# qr(
# # non-escaped brace expression, with at least one comma
# (?P<bash_brace>
# (?<!\\)(?P<slashes_before_bash_brace>\\\\)*\{
# (?P<bash_brace_content>
# $re_bash_brace_element(?:, $re_bash_brace_element )+
# )
# (?<!\\)(?:\\\\)*\}
# )
# |
# # 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<literal_brace_single_element>
# (?<!\\)(?:\\\\)*\{
# $re_bash_brace_element
# (?<!\\)(?:\\\\)*\}
# )
# |
# (?P<bash_class>
# # non-empty, non-escaped character class
# (?<!\\)(?:\\\\)*\[
# (?: \\\\ | \\\[ | \\\] | [^\\\[\]] )+
# (?<!\\)(?:\\\\)*\]
# )
# |
# (?P<bash_joker>
# # non-escaped * and ?
# (?<!\\)(?:\\\\)*(?:\*\*?|\?)
# )
# |
# (?P<sql_joker>
# # non-escaped % and ?
# (?<!\\)(?:\\\\)*[%_]
# )
# |
# (?P<literal>
# [^\\\[\]\{\}*?%_]+
script/_acme-cpanauthors view on Meta::CPAN
# }
#
# } elsif (defined($p = $m{literal_brace_single_element})) {
# push @res, quotemeta($p);
# } elsif (defined($p = $m{bash_class})) {
# # XXX no need to escape some characters?
# push @res, $p;
# } elsif (defined($p = $m{sql_joker})) {
# push @res, quotemeta($p);
# } elsif (defined($p = $m{literal})) {
# push @res, quotemeta($p);
script/_acme-cpanauthors view on Meta::CPAN
# $bool = contains_wildcard($wildcard_str)
#
#Return true if C<$str> contains wildcard pattern. Wildcard patterns include
#I<joker> such as C<*> (meaning zero or more of any characters) and C<?> (exactly
#one of any character), I<character class> C<[...]>, and I<brace> C<{...,}>
#(brace expansion). A pattern can be escaped using a bacslash so it becomes
#literal, e.g. C<foo\*> does not contain wildcard because it's C<foo> followed by
#a literal asterisk C<*>.
#
#Aside from the abovementioned wildcard patterns, bash does other types of
#expansions/substitutions too, but these are not considered wildcard. These
script/_acme-cpanauthors view on Meta::CPAN
#
#Convert bash wildcard to SQL pattern. This includes:
#
#=over
#
#=item * converting unescaped C<*> to C<%>
#
#=item * converting unescaped C<?> to C<_>
#
#=item * escaping unescaped C<%>
#
#=item * escaping unescaped C<_>
#
#=back
#
#Unsupported constructs will cause the function to die.
#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Adenosine.pm view on Meta::CPAN
# ABSTRACT: Handy CLI HTTP tool
use URI;
use Getopt::Long qw(:config pass_through no_ignore_case);
use File::Path 'mkpath';
use URI::Escape 'uri_escape';
use File::Spec::Functions 'splitpath';
use Path::Class;
use Text::ParseWords;
use Scalar::Util 'blessed';
use Module::Runtime 'use_module';
lib/App/Adenosine.pm view on Meta::CPAN
push @extra, '-I' if $action eq 'HEAD';
my $_path = $uri_base;
$_path =~ s/\*/$path/;
$query = uri_escape($query) if $quote;
push @extra, $self->host_method_config( $self->host($uri_base), $action );
$query = "?$query" if $query;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MojoX/Aliyun.pm view on Meta::CPAN
);
# say Dumper(\%auth_params); use Data::Dumper;
# Thanks to https://github.com/lemontv/AliyunPerlLib/blob/master/Aliyun/Auth.pm
my %dumb = %auth_params; $dumb{Timestamp} = uri_escape($dumb{Timestamp});
my @tmps = map { join('=', $_, $dumb{$_}) } sort keys(%dumb);
my $StringToSign = join("&", @tmps);
$StringToSign = join('&', $method, uri_escape($path), uri_escape($StringToSign));
my $Signature = hmac_sha1_base64($StringToSign, $self->access_secret . '&');
$auth_params{Signature} = $Signature . '=';
my $tx = $self->ua->build_tx($method => $url => form => \%auth_params );
$tx = $self->ua->start($tx);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/AltSQL.pm view on Meta::CPAN
The hostname the model is connected to
=item B<%%>
An escaped percent sign
=item B<%c{...}>
A L<Term::ANSIColor> color name. The value will be passed directly to the C<color> method.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ArduinoBuilder/System.pm view on Meta::CPAN
# Splits a given command line string into individual arguments.
# Returns the array of individual arguments.
#
# This approach is very primitive. However both Parse::CommandLine and
# Text::ParseWords have the same issue that they consider that a backslash can
# escape any character, which is wrong on Windows (C:\foo is not C:foo).
# Also Text::Balanced, is not well suited for this case where we can have
# unquoted pieces of text.
#
# Ideally, we would use whatever Perl uses to split a command into word as
# per https://perldoc.perl.org/functions/exec, but this does not seem to be
# exposed
#
# TODO: support escaped quotes (that are not quoting arguments) as well as,
# maybe, quotes interrupting unquoted arguments.
sub split_cmd {
my ($cmd) = @_;
my @cmd;
while ($cmd =~ m/ \G \s* (?: (['"])(?<p>.*?)\1 | (?<p>[^ ]+) ) /gx) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Minilla/ModuleMaker/InlineMakeMaker.pm view on Meta::CPAN
local $Data::Dumper::Useqq = 1;
local $Data::Dumper::Purity = 1;
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Sortkeys = 1;
my $content = get_data_section('Makefile.PL');
my $mt = Text::MicroTemplate->new(template => $content, escape_func => sub { $_[0] });
my $src = $mt->build->($project);
spew_raw('Makefile.PL', $src);
}
sub prereqs {
my ($self, $project) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/BackupPlan.pm view on Meta::CPAN
E<lt>sourceDirE<gt>. This is specified by a string of type C<n[dmy]>, where n is a number and the
second letter is either C<d> for days, C<m> for months or C<y> for years. Internally, C<1m = 30d>
and C<1y = 360d>, wihtout considering months of 28 or 31 days.
=item * B<E<lt>sourceDirE<gt>> The path for the directory structure to be backed up. It requires
a B<CDATA> xml tag to escape the slashes in the full path.
=item * B<E<lt>targetDirE<gt>> The path for the destination directory where backup files are stored. It requires
a B<CDATA> xml tag to escape the slashes in the full path. Typically this will be a single location on the disk,
and hence the same for all tasks and specified in the E<lt>defaultE<gt> section.
=back
=back
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
perl: v5.14.0
strict: 0
vars: 0
warnings: 0
resources:
repository: git://github.com/27escape/App-Basis-ConvertText2-UtfTransform.git
version: 0.4.0
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Basis/ConvertText2.pm view on Meta::CPAN
* charts
* barcodes and qrcodes
* and many others
See
https://github.com/27escape/App-Basis-ConvertText2/blob/master/README.md
for more information.
=head1 Todo
Consider adding plugins for
lib/App/Basis/ConvertText2.pm view on Meta::CPAN
foreach my $k ( keys %{ $self->replace() } ) {
next if ( !$self->{replace}->{$k} );
# in the text the variables to be replaced are surrounded by %
# zero width look behind to make sure the variable name has
# not been escaped _%VARIABLE% should be left alone
$content =~ s/(?<!_)%$k%/$self->{replace}->{$k}/gsm;
}
return $content;
}
view all matches for this distribution
view release on metacpan or search on metacpan
Try::Tiny: 0
perl: v5.12.0
strict: 0
warnings: 0
resources:
repository: git://github.com/27escape/App-Basis-Email.git
version: 0.3
view all matches for this distribution
view release on metacpan or search on metacpan
feature: '0'
perl: v5.10.0
strict: '0'
warnings: '0'
resources:
repository: git://github.com/27escape/App-Basis-Queue.git
version: 000.600.100
x_serialization_backend: 'YAML::Tiny version 1.70'
view all matches for this distribution
view release on metacpan or search on metacpan
strict: '0'
utf8::all: '0'
vars: '0'
warnings: '0'
resources:
repository: git://github.com/27escape/App-Basis.git
version: '1.2'
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/colorplus view on Meta::CPAN
colorplus [-0] [-n N|-3|-4] [-c colorname] [-e N[,N[,N..]]] [-l N] [-s REGEX] [-t N] [-/ char]
colorplus [--help [opt|en]] [--version]
=head1 DESCRIPTION
Put colors (ASCII color escape sequnces) parts on text data such as numerical parts,
columns cyclically, text matching specific regular expressions. Useful to look around
CSV/TSV files with a pager LESS (less -R).
=head1 OPTIONS
=over 4
=item B<-0>
Remove colors (remove all the ASCII color escape sequences).
=item B<-n> N
Put colors on numerical characters. Every neighboring N digits from the bottom of a numerical
character sequence has a same color. Cyan, green, yellow are used to colorize.
scripts/colorplus view on Meta::CPAN
Same as the specification B<-n 4>.
=item B<-c> colorname
Speficy the colorname. It can be "blue", "red", "yellow", and also "on_while", "underline" and so on.
See the ASCII color escape sequences.
=item B<-e> N,N,...
Any operation by "colorplus" is exemplified on the lines specified by the number(s) beginning from 1.
-0 is also cancelled on the specified lines, thus in this case, the input color on the specified line
view all matches for this distribution
view release on metacpan or search on metacpan
=head1 DESCRIPTION
This program combines the power of three Unix tools (in their GNU versions): bool, find and grep to provide a way to search by filenames and/or by file contents using boolean expressions. Internaly, all boolean expressions with regexps/strings are tr...
Complex searches using B<grep> are very painful and B<bool> have lots of limitations and complex escape rules. B<bfg> simplify these searches by using more clear syntax and better performance in some cases.
For example, to search
first AND second AND third AND fourth AND NOT fifth
Show only filenames.
=item * --slash-as-delim, -s
Inhibt operators and parentheses interpretation insid slashes. To use literal slashes, escape them with a backslash.
=back
=head1 EXAMPLES
view all matches for this distribution
view release on metacpan or search on metacpan
share/de-de.dis view on Meta::CPAN
display \x000B 1378 #11^Kvertical tabulation
display \x000C 12378 #12^Lform feed
display \x000D 13478 #13^Mcarriage return
display \x000E 134578 #14^Nshift out
display \x000F 13578 #15^Oshift in
display \x0010 123478 #16^Pdata link escape
display \x0011 1234578 #17^Qdevice control one
display \x0012 123578 #18^Rdevice control two
display \x0013 23478 #19^Sdevice control three
display \x0014 234578 #20^Tdevice control four
display \x0015 13678 #21^Unegative acknowledge
display \x0016 123678 #22^Vsynchronous idle
display \x0017 245678 #23^Wend of transmission block
display \x0018 134678 #24^Xcancel
display \x0019 1345678 #25^Yend of medium
display \x001A 135678 #26^Zsubstitute
display \x001B 24678 #27^[escape
display \x001C 125678 #28^\file separator
display \x001D 1245678 #29^]group separator
display \x001E 4578 #30^^record separator
display \x001F 45678 #31^_unit separator
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CCSV.pm view on Meta::CPAN
}
sub _init
{
my $out = length($_[-1] || '') > 1 && $#_ > 0 ? pop : ''; # last argument length > 1 means csvout config section if more than 1 argument
my ($quote,$sep,$escape,$eol) = @_;
#print join "|", ($quote, $sep, $escape, $eol,"\n");
my $cfgfile = $ENV{CCSVCONF} || $ENV{HOME} || '~';
$cfgfile = $cfgfile . '/.CCSVConf' unless $ENV{CCSVCONF};
if (length($quote || '') <= 1) # length > 1 specifies config section
{
$csv = Text::CSV_XS->new( {
quote_char => $quote || '"',
sep_char => $sep || ',',
escape_char => $escape || '"',
eol => $eol || '',
binary => 1,
} );
} else
{
lib/App/CCSV.pm view on Meta::CPAN
C<$csv> will be initialized with your config for the CSV input, C<$csvout> for the CSV output. In case you haven't specified any configs, C<$csv> and C<$csvout> will be initialized as this:
Text::CSV_XS->new( {
quote_char => '"',
sep_char => ',',
escape_char '"',
eol => '',
binary => 1,
} );
Note that these are slightly different from the L<Text::CSV_XS> defaults.
lib/App/CCSV.pm view on Meta::CPAN
=back
=head1 CONFIGURATION
You can configure CSV quote char, separator, escape char and end of line char by passing them directly to the module, like this:
:~$ perl -MApp::CCSV=<quote char>,<sep char>,<escape char>,<eol char> -ne 'print @f' < some.csv
Note that these are really limited to one character. More than one character would mean a config section in the config file (more about the config file in a moment).
If you don't specify any options, the defaults shown under "EXPORTS" will be used.
Any of the characters can be skipped, in which case the defaults will be used. For instance, setting only the escape char to for example "@" will look like this:
:~$ perl -MApp::CCSV=,,@ -ne 'print @f' < some.csv
=head1 CONFIG FILE
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base/Filter.pm view on Meta::CPAN
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Terse = 1;
Data::Dumper::Dumper(@_);
}
sub escape {
$self->assert_scalar(@_);
my $text = shift;
$text =~ s/(\\.)/eval "qq{$1}"/ge;
return $text;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base/Filter.pm view on Meta::CPAN
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Terse = 1;
Data::Dumper::Dumper(@_);
}
sub escape {
$self->assert_scalar(@_);
my $text = shift;
$text =~ s/(\\.)/eval "qq{$1}"/ge;
return $text;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base/Filter.pm view on Meta::CPAN
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Terse = 1;
Data::Dumper::Dumper(@_);
}
sub escape {
$self->assert_scalar(@_);
my $text = shift;
$text =~ s/(\\.)/eval "qq{$1}"/ge;
return $text;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base/Filter.pm view on Meta::CPAN
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Terse = 1;
Data::Dumper::Dumper(@_);
}
sub escape {
$self->assert_scalar(@_);
my $text = shift;
$text =~ s/(\\.)/eval "qq{$1}"/ge;
return $text;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution