App-Framework
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
# It's in core of perl >= 5.9.3, and should be installed
# as one of the Pod::Simple's prereqs, which is a prereq
# of Pod::Text 3.x (see also below).
$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
{
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) {
# Pod::Text < 3.0 has yet another mapping table,
# though the table name of 2.x and 1.x are different.
# (1.x is in core of Perl < 5.6, 2.x is in core of
# Perl < 5.9.3)
my $mapping = ($Pod::Text::VERSION < 2)
? \%Pod::Text::HTML_Escapes
: \%Pod::Text::ESCAPES;
$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
{
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
$author =~ s{E<lt>}{<}g;
$author =~ s{E<gt>}{>}g;
}
$self->author($author);
} else {
lib/App/Framework/Base.pm view on Meta::CPAN
#use re 'debugcolor' ;
foreach my $val_ref (@vals)
{
print " # Expand \"$$val_ref\" ...\n" if $class_debug;
$$val_ref =~ s{
(?:
[\\\$]\$ # escaped dollar
\{{0,1} # optional brace
(\w+) # find a "word" and store it in $1
\}{0,1} # optional brace
)
|
(?:
\$ # find a literal dollar sign
\{{0,1} # optional brace
(\w+) # find a "word" and store it in $1
\}{0,1} # optional brace
)
}{
my $prefix = '' ;
my ($escaped, $var) = ($1, $2) ;
$escaped ||= '' ;
$var ||= '' ;
print " # esc=\"$escaped\", prefix=\"$prefix\", var=\"$var\"\n" if $class_debug;
my $replace='' ;
if ($escaped)
{
$prefix = '$' ;
$replace = $escaped ;
print " ## escaped prefix=$prefix replace=$replace\n" if $class_debug;
print " ## DONE\n" if $class_debug;
}
else
{
## use current HASH values before vars
if (defined $hash_ref->{$var})
{
print " ## var=$var current state=${$_state_href->{$var}}\n" if $class_debug;
if (${$_state_href->{$var}} eq 'to_expand')
{
lib/App/Framework/Base.pm view on Meta::CPAN
print " ## var=$var can replace now=$replace\n" if $class_debug;
if (!$replace)
{
$replace = "" ;
print " ## no replacement\n" if $class_debug;
print " ## DONE\n" if $class_debug;
}
}
print " ## ALL DONE $key: $escaped$var = \"$prefix$replace\"\n\n" if $class_debug;
"$prefix$replace" ;
}egxm; ## NOTE: /m is for multiline anchors; /s is for multiline dots
}
$class->prt_data("Hash now=", $hash_ref) if $class_debug>=2;
# mark as expanded
${$_state_href->{$key}} = 'expanded' ;
$class->prt_data("State now=", $_state_href) if $class_debug>=2;
lib/App/Framework/Base/Object.pm view on Meta::CPAN
sub quote_str
{
my $this = shift ;
my ($str) = @_ ;
##my $class = $this->class() ;
# skip on Windows machines
unless ($^O eq 'MSWin32')
{
# first escape any existing quotes
$str =~ s%\\'%'%g ;
$str =~ s%'%'\\''%g ;
$str = "'".$str."'" ;
}
return $str ;
}
lib/App/Framework/Extension/Filter.pm view on Meta::CPAN
=item I<filter_path> - Directory path of input file
=item I<filter_ext> - Extension of input file
=item I<filter_filenum> - Input file number (starting from 1)
=back
NOTE: Specifying these variables for options at the command line will require you to escape the variables per the operating system you are using (e.g. use single quotes ' ' around
the value in Linux).
For example, with the command line arguments:
-outfile '/tmp/$filter_name-$filter_filenum.txt' afile.doc /doc/bfile.text
Processes './afile.doc' into '/tmp/afile-1.txt', and '/doc/bfile.text' into '/tmp/bfile-2.txt'
=head2 Example
( run in 0.470 second using v1.01-cache-2.11-cpan-c21f80fb71c )