view release on metacpan or search on metacpan
package ful;
=pod
=encoding utf-8
=head1 NAME
ful - a useI<ful> "B<f>ind B<u>pper B<l>ib" pragma that ascends dirs to include
module directories in C<@INC>.
view all matches for this distribution
view release on metacpan or search on metacpan
"test" : {
"requires" : {
"FindBin" : "0",
"List::Compare" : "0",
"Test::More" : "0",
"utf8" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acrux/DBI.pm view on Meta::CPAN
package Acrux::DBI;
use strict;
use utf8;
=encoding utf8
=head1 NAME
Acrux::DBI - Database independent interface for Acrux applications
lib/Acrux/DBI.pm view on Meta::CPAN
my $url = $dbi->url;
$dbi = $dbi->url('sqlite:///tmp/test.db?sqlite_unicode=1');
$dbi = $dbi->url('sqlite:///./test.db?sqlite_unicode=1'); # '/./' will be removed
$dbi = $dbi->url('postgres://foo:pass@localhost/mydb?PrintError=1');
$dbi = $dbi->url('mysql://foo:pass@localhost/test?mysql_enable_utf8=1');
Database connect url
The database connection URL from which all other attributes can be derived.
C<"url"> must be specified before the first call to C<"connect"> is made,
view all matches for this distribution
view release on metacpan or search on metacpan
eg/acrux_log.pl view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use utf8;
use Acrux::Log;
use IO::Handle;
my $log = Acrux::Log->new(
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ActiveRecord/Simple.pm view on Meta::CPAN
use strict;
use warnings;
our $VERSION = '1.11';
use utf8;
use Carp;
use Scalar::Util qw/blessed/;
use ActiveRecord::Simple::QueryManager;
use ActiveRecord::Simple::Utils qw/all_blessed class_to_table_name load_module/;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Activiti/Rest/Response.pm view on Meta::CPAN
# { "errorMessage": "<errorMessage>", "statusCode": "statusCode" }
#from version 5.17
# { "message": "<http message>", "exception": "<former errorMessage>" }
my $content_hash = JSON::decode_json($res->content);
my $exception = $content_hash->{exception} || $content_hash->{errorMessage};
#can return multiple values (e.g. 'application/json','charset=utf-8')
my $ct = $res->content_type;
my $args = {
status_code => $res->code,
message => $res->message,
content => $res->content,
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
);
sub MY::postamble {
'
htmldocs ::
find lib -name *.pm | sed s/.pm$$// |sed s/^lib.// | xargs -i# pod2html --podroot=. --podpath=lib --infile=lib/#.pm --outfile=html/#.html
'
}
view all matches for this distribution
view release on metacpan or search on metacpan
1;
=pod
=encoding utf8
=head1 NAME
Ado - a rapid active commotion (framework for web-projects on Mojolicious)
view all matches for this distribution
view release on metacpan or search on metacpan
$control{MERGE} = \@lst;
# The count for sensitive entries ...
$control{SENSITIVE_CNT} = sensitive_cnt ();
# Assume not allowing utf8/Unicode/Wide Char dates ...
# Or inside the config file itself.
$control{ALLOW_UTF8} = 0;
# Controls the behavior of this module.
# Only exists in the parent object.
DBUG_RETURN ( $self );
}
# Only called by Advanced::Config::Reader::read_config() ...
# So not exposed in the POD!
# Didn't rely on read option 'use_utf8' since in many cases
# the option is misleading or just plain wrong!
sub _allow_utf8
{
DBUG_ENTER_FUNC ( @_ );
my $self = shift;
# Tells calls to Advanced::Config::Options::apply_get_rules() that
# If there's no alias provided, use a default value for it ...
# There is no filename to use for decryption purposes without it.
$read_opts->{alias} = "STRING" unless ( $read_opts->{alias} );
# Dynamically correct based on type of string ...
$read_opts->{use_utf8} = ( $string =~ m/[^\x00-\xff]/ ) ? 1 : 0;
# Behaves diferently based on who calls us ...
my $c = (caller(1))[3] || "";
my $by = __PACKAGE__ . "::merge_string";
if ( $c eq $by ) {
view all matches for this distribution
view release on metacpan or search on metacpan
builder/Affix/Builder.pm view on Meta::CPAN
$cflags .= ' -pthread';
$ldflags .= ' -pthread';
}
}
method write_file( $filename, $content ) { path($filename)->spew_raw($content) or die "Could not open $filename: $!\n" }
method read_file ($filename) { path($filename)->slurp_utf8 or die "Could not open $filename: $!\n" }
method step_build() {
$self->step_affix;
my %modules = map { $_ => catfile( 'blib', $_ ) } find( qr/\.pm$/, 'lib' );
my %docs = map { $_ => catfile( 'blib', $_ ) } find( qr/\.pod$/, 'lib' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Annotation.pm view on Meta::CPAN
return \%ann if !-d(my $ini = $self->ini);
while(<$ini/*.ann>) {
my $path = $_;
my $annotation_name = path()->{name};
open my $f, "<:utf8", $_ or do { warn "$_ not opened: $!"; next };
while(<$f>) {
warn "$path corrupt on line $.!" unless /^([\w:]+)#(\w*),(\d+)=(.*)$/;
push @{$ann{$annotation_name}{$1}{$2}}, [$3, $4];
}
close $f;
lib/Aion/Annotation.pm view on Meta::CPAN
return \%remark if $self->force;
my $remark_path = $self->remark_path;
return \%remark if !-e $remark_path;
open my $f, "<:utf8", $remark_path or do { warn "$remark_path not opened: $!"; return \%remark };
while(<$f>) {
warn "$remark_path corrupt on line $.!" unless /^([\w:]+)#(\w*),(\d+)=(.*)$/;
$remark{$1}{$2} = [$3, [map { s/\\(.)/$1/gr } split /\\n/, $4]];
}
close $f;
lib/Aion/Annotation.pm view on Meta::CPAN
return \%mtime if $self->force;
my $mtime_path = $self->modules_mtime_path;
return \%mtime if !-e $mtime_path;
open my $f, "<:utf8", $mtime_path or do { warn "$mtime_path not opened: $!"; return 0 };
while(<$f>) {
warn "$mtime_path corrupt on line $.!" unless /^(?<module>[\w:]+)=(?<year>\d{4})-(?<mon>\d{2})-(?<mday>\d{2}) (?<hour>\d{2}):(?<min>\d{2}):(?<sec>\d{2})$/;
$mtime{$+{module}} = timelocal($+{sec}, $+{min}, $+{hour}, $+{mday}, $+{mon} - 1, $+{year});
}
close $f;
lib/Aion/Annotation.pm view on Meta::CPAN
$modules_mtime->{$pkg} = $mtime;
delete $_->{$pkg} for values %$ann;
delete $remark->{$pkg};
open my $f, "<:utf8", $_ or do { warn "$_ not opened: $!"; next };
my @ann; my @rem;
my $save_annotation = sub {
my ($name, $pkg1) = @_;
$pkg1 //= $pkg;
push @{$ann->{$_->[0]}{$pkg1}{$name}}, $_->[1] for @ann;
lib/Aion/Annotation.pm view on Meta::CPAN
my $path = $self->annotation_path($annotation_name);
if(!keys %$pkgs) {
erase($path) if -e $path;
next;
}
open my $f, ">:utf8", $path or do { warn "$path not writed: $!" };
for my $pkg (sort keys %$pkgs) {
my $subs = $pkgs->{$pkg};
for my $sub (sort keys %$subs) {
my $annotation = $subs->{$sub};
print $f "$pkg#$sub,$_->[0]=$_->[1]\n" for @$annotation;
lib/Aion/Annotation.pm view on Meta::CPAN
}
# СоÑ
ÑанÑем вÑÐµÐ¼Ñ Ð¿Ð¾Ñледнего Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñайлов
my $mtime_path = mkpath $self->modules_mtime_path;
open my $f, ">:utf8", $mtime_path or do { warn "$mtime_path not writed: $!" };
printf $f "%s=%s\n", $_, strftime('%Y-%m-%d %H:%M:%S', localtime $modules_mtime->{$_}) for sort grep { $modules_mtime->{$_} } keys %$modules_mtime;
close $f;
# СоÑ
ÑанÑем комменÑаÑии
my $remark_path = $self->remark_path;
open my $f, ">:utf8", $remark_path or do { warn "$remark_path not writed: $!" };
for my $pkg (sort keys %$remark) {
next if !exists $exists{$pkg};
my $subs = $remark->{$pkg};
for my $sub (sort keys %$subs) {
my ($line, $rem) = @{$subs->{$sub}};
lib/Aion/Annotation.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Annotation - processes annotations in perl modules
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Carp.pm view on Meta::CPAN
sub handler {
my ($x) = @_;
if(!ref $x) {
no utf8; use bytes;
if($x =~ s/\n[ \t]+\.\.\.propagated at .* line \d+\.\n\z/\n/) {}
else {
$x =~ s/ at .*? line \d+\.\n\z//;
my $c = Carp::longmess('');
$c =~ s/^( at .*? line \d+)\.\n/$x\n\tdie(...) called$1\n/;
lib/Aion/Carp.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Carp - adds stack trace to exceptions
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Emitter.pm view on Meta::CPAN
has event => (is => 'ro', isa => HashRef[ArrayRef[Dict[pkg => Str, sub => Str, line => Nat, nice => Option[Num], remark => Option[Str]]]], default => sub {
my ($self) = @_;
my %event = %{EVENT()};
if(defined $self->ini and -e $self->ini) {
open my $f, "<:utf8", $self->ini or die "Not open ${\$self->ini}";
while(<$f>) {
close($f), die "${\$self->ini}:$. corrupt!" unless /^([\w:]+)#(\w*),(\d+)=(?:(-?\d+(?:\.\d+)?)\s+)?([a-z][\w:]*(?:#[\w.:-]+)?)(?:\s+(.*?))??\s*$/i;
my ($pkg, $sub, $line, $nice, $evt, $remark) = ($1, $2, $3, $4, $5, $6);
push @{$event{$evt}}, {
pkg => $pkg,
lib/Aion/Emitter.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Emitter - event dispatcher
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Enum.pm view on Meta::CPAN
my $alias_ref = $ALIAS{$cls} = {};
my $path = $INC{($cls =~ s!::!/!gr) . ".pm"};
die "$cls not loaded!" unless $path;
open my $f, "<:utf8", $path or die "$path: $!";
my $alias;
my $id = '[a-zA-Z_]\w*';
while(<$f>) {
$alias = $1 if /^# (\S.*?)\s*$/;
lib/Aion/Enum.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion :: Enum - Listing in the style of OOP, when each renewal is an object
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Format.pm view on Meta::CPAN
# ÐовÑÑка Ð´Ð»Ñ STDERR
sub trapperr(&) {
my $sub = shift;
local *STDERR;
open STDERR, '>:utf8', \my $f; my $guard = Guard::guard { close STDERR };
$sub->();
undef $guard;
utf8::decode($f) unless utf8::is_utf8($f);
$f
}
# ÐовÑÑка Ð´Ð»Ñ STDOUT
sub trappout(&) {
my $sub = shift;
local *STDOUT;
open STDOUT, '>:utf8', \my $f; my $guard = Guard::guard { close STDOUT };
$sub->();
undef $guard;
utf8::decode($f) unless utf8::is_utf8($f);
$f
}
#@category ЦвеÑ
lib/Aion/Format.pm view on Meta::CPAN
# ÐÑполÑÐ·Ð¾Ð²Ð°Ð½Ñ ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ Ð¸Ð· кодиÑовки cp1251, ÑÑо нÑжно Ð´Ð»Ñ ÐºÐ¾ÑÑекÑной запиÑи в ÑаблиÑÑ
our $CIF = join "", "0".."9", "A".."Z", "a".."z", "_-", # 64 Ñимвола Ð´Ð»Ñ 64-ÑиÑной ÑиÑÑÐµÐ¼Ñ ÑÑиÑлениÑ
(map chr, ord "Ð" .. ord "Я"), "ÐÐÐÐÐÐÐÐÐÐÒÐÐÐÐ
",
(map chr, ord "а" .. ord "Ñ"), "ÑÑÑÑÑÑÑÑÑÑÒÑÑÑÑ",
"âââ¦â â¡â¬â°â¹âââââ¢âââ¢âºÂ¤Â¦Â§Â©Â«Â¬Â®°±µ¶·â»", do { no utf8; chr 0xa0 }, # небÑквеннÑе ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ Ð¸Ð· cp1251
"!\"#\$%&'()*+,./:;<=>?\@[\\]^`{|}~", # ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ Ð¿ÑнкÑÑаÑии ASCII
" ", # пÑобел
(map chr, 0 .. 0x1F, 0x7F), # ÑпÑавлÑÑÑие ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ ASCII
# Ñимвол 152 (0x98) в cp1251 оÑÑÑÑÑÑвÑеÑ.
;
lib/Aion/Format.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Format - a Perl extension for formatting numbers, coloring output, etc.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Fs.pm view on Meta::CPAN
}
# ÐолÑÑиÑÑ Ð¸ÑеÑаÑÐ¾Ñ Ð½Ð° Ñайл
sub icat(;$) {
my ($file) = @_ == 0? $_: @_;
my $layer = ":utf8";
($file, $layer) = @$file if ref $file;
my $f = Symbol::gensym;
open $f, "<$layer", $file or die "icat $file: $!";
lib/Aion/Fs.pm view on Meta::CPAN
}
# ÐолÑÑиÑÑ ÑайловÑй деÑкÑипÑÐ¾Ñ Ð´Ð»Ñ Ð²Ñвода
sub ilay(;$) {
my ($file) = @_ == 0? $_: @_;
my $layer = ":utf8";
($file, $layer) = @$file if ref $file;
my $f = Symbol::gensym;
open $f, ">$layer", $file or die "ilay $file: $!";
lib/Aion/Fs.pm view on Meta::CPAN
}
# СÑиÑаÑÑ Ñайл
sub cat(;$) {
my ($file) = @_ == 0? $_: @_;
my $layer = ":utf8";
($file, $layer) = @$file if ref $file;
open my $f, "<$layer", $file or die "cat $file: $!";
read $f, my $x, -s $f;
close $f;
$x
}
# ÐапиÑаÑÑ Ñайл
sub lay ($;$) {
my ($file, $s) = @_ == 1? ($_, @_): @_;
my $layer = ":utf8";
($file, $layer) = @$file if ref $file;
open my $f, ">$layer", $file or die "lay $file: $!";
local $\;
print $f $s;
close $f;
lib/Aion/Fs.pm view on Meta::CPAN
sub replace(&@) {
my $fn = shift;
my @noreplace; local $_; my $pkg = caller;
my $aref = "$pkg\::a"; my $bref = "$pkg\::b";
for $$aref (@_) {
if(ref $$aref) { ($$aref, $$bref) = @$$aref } else { $$bref = ":utf8" }
my $file = $_ = cat [$$aref, $$bref];
$fn->();
if($file ne $_) { lay [$$aref, $$bref], $_ } else { push @noreplace, $$aref if defined wantarray }
}
@noreplace
lib/Aion/Fs.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Fs - utilities for the file system: reading, writing, searching, replacing files, etc.
lib/Aion/Fs.pm view on Meta::CPAN
noenter "*small*",
errorenter { warn "find $_: $!" };
\@noreplaced; # --> ["hello/moon.txt"]
cat "hello/world.txt"; # => hello/world.txt :utf8 Hi!
cat "hello/moon.txt"; # => noreplace
cat "hello/big/world.txt"; # => hello/big/world.txt :utf8 Hellow!
cat "hello/small/world.txt"; # => noenter
[find "hello", "*.txt"]; # --> [qw! hello/moon.txt hello/world.txt hello/big/world.txt hello/small/world.txt !]
my @dirs;
lib/Aion/Fs.pm view on Meta::CPAN
Reads the file. If no parameter is specified, use C<$_>.
cat "/etc/passwd" # ~> root
C<cat> reads with layer C<:utf8>. But you can specify another layer like this:
lay "unicode.txt", "â¯";
length cat "unicode.txt" # -> 1
length cat["unicode.txt", ":raw"] # -> 3
lib/Aion/Fs.pm view on Meta::CPAN
=over
=item * If one parameter is specified, use C<$_> instead of C<$file>.
=item * C<lay>, uses the C<:utf8> layer. To specify a different layer, use an array of two elements in the C<$file> parameter:
=back
lay "unicode.txt", "â¯" # => unicode.txt
lay ["unicode.txt", ":raw"], "â¯" # => unicode.txt
lib/Aion/Fs.pm view on Meta::CPAN
=item * L<IO::All::Rule> â C<< $next = IO::All::Rule-E<gt>new-E<gt>file-E<gt>size("E<gt>10k")-E<gt>iter($dir1, $dir2); push @paths, "$f" while $f = $next-E<gt>() >>.
=item * L<File::Find> â C<find( sub { push @paths, $File::Find::name if /\.png/ }, $dir )>.
=item * L<File::Find::utf8> â like L<File::Find>, only file paths are in I<utf8>.
=item * L<File::Find::Age> â sorts files by modification time (inherits L<File::Find::Rule>): C<< File::Find::Age-E<gt>in($dir1, $dir2) >>.
=item * L<File::Find::Declare> â C<< @paths = File::Find::Declare-E<gt>new({ size =E<gt> 'E<gt>10K', perms =E<gt> 'wr-wr-wr-', modified =E<gt> 'E<lt>2010-01-30', recurse =E<gt> 1, dirs =E<gt> [$dir1] })-E<gt>find >>.
lib/Aion/Fs.pm view on Meta::CPAN
=head2 replace (&sub, @files)
Replaces each file with C<$_> if it is modified by C<&sub>. Returns files that have no replacements.
C<@files> can contain arrays of two elements. The first is considered as a path, and the second as a layer. The default layer is C<:utf8>.
C<&sub> is called for each file in C<@files>. It transmits:
=over
lib/Aion/Fs.pm view on Meta::CPAN
=item * C<$b> â the layer with which the file was read and with which it will be written.
=back
In the example below, the file "replace.ex" is read by the C<:utf8> layer and written by the C<:raw> layer in the C<replace> function:
local $_ = "replace.ex";
lay "abc";
replace { $b = ":utf8"; y/a/¡/ } [$_, ":raw"];
cat # => ¡bc
=head3 See also
=over
=item * L<File::Edit> â C<< File::Edit-E<gt>new($file)-E<gt>replace('x', 'y')-E<gt>save >>.
=item * L<File::Edit::Portable> â C<< File::Edit::Portable-E<gt>new-E<gt>splice(file =E<gt> $file, line =E<gt> 10, contens =E<gt> ["line1", "line2"]) >>.
=item * L<File::Replace> â C<< ($infh,$outfh,$repl) = replace3($file); while (E<lt>$infhE<gt>) { print $outfh "X: $_" } $repl-E<gt>finish >>.
=item * L<File::Replace::Inplace>.
=back
lib/Aion/Fs.pm view on Meta::CPAN
Reads the file for the first time. Any subsequent attempt to read this file returns C<undef>. Used to insert js and css modules into the resulting file. Without a parameter, uses C<$_>.
=over
=item * C<$file> can contain arrays of two elements. The first is considered as a path, and the second as a layer. The default layer is C<:utf8>.
=item * If C<$file> is not specified, use C<$_>.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Query.pm view on Meta::CPAN
my $CONN;
sub default_connect_options() {
return default_dsn, USER, PASS, $CONN //= CONN // do {
if(DRV =~ /mysql|mariadb/i) {[
"SET NAMES utf8",
"SET sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'",
]}
else {[]}
};
}
lib/Aion/Query.pm view on Meta::CPAN
sub base_connect {
my ($dsn, $user, $password, $conn) = @_;
my $base = DBI->connect($dsn, $user, $password, {
RaiseError => 1,
PrintError => 0,
$dsn =~ /^DBI:mysql/i ? (mysql_enable_utf8 => 1): (),
}) or die "Connect to db failed";
$base->do($_) for @$conn;
return $base unless wantarray;
my ($base_connection_id) = $dsn =~ /^DBI:(mysql|mariadb)/i
lib/Aion/Query.pm view on Meta::CPAN
}
# ÐÑеобÑазÑÐµÑ Ð² бинаÑнÑÑ ÑÑÑÐ¾ÐºÑ Ð¿ÑинÑÑÑÑ Ð² MYSQL
sub _to_hex_str($) {
my ($s) = @_;
no utf8;
use bytes;
$s =~ s/./sprintf "%02X", ord $&/gaes;
"X'$s'"
}
# ÐÐ´ÐµÑ Ð¿ÐµÑекодиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ñимволов:
# Рбазе иÑполÑзÑеÑÑÑ cp1251, поÑÑÐ¾Ð¼Ñ ÑимволÑ, коÑоÑÑе в Ð½ÐµÑ Ð½Ðµ вÑ
одÑÑ, нÑжно пеÑевеÑÑи в поÑледоваÑелÑноÑÑи.
# Ðид поÑледоваÑелÑноÑÑи: °ЧÐСÐÐ_Ð_254-ÑиÑной ÑиÑÑеме; \x7F
# Ðнак ° вÑбÑан поÑомÑ, ÑÑо он вÑÑе 127, ÑооÑвеÑÑÑвенно ÑÑÑока из Ð±Ð°Ð·Ñ Ð´Ð°Ð½Ð½ÑÑ
, ÑодеÑжаÑÐ°Ñ ÑакÑÑ Ð¿Ð¾ÑледоваÑелÑноÑÑÑ,
# бÑÐ´ÐµÑ Ñ Ñлагом utf8, ÑÑо необÑ
одимо Ð´Ð»Ñ Ð¾Ð±ÑаÑного пеÑекодиÑованиÑ.
sub _recode_cp1251 {
my ($s) = @_;
return $s unless BQ;
$s =~ s/°|[^\Q$Aion::Format::CIF\E]/"°${\ to_radix(ord $&, 254) }\x7F"/ge;
$s
lib/Aion/Query.pm view on Meta::CPAN
$k =~ /^-?(?:0|[1-9]\d*)(\.\d+)?\z/a
&& ($ref = ref B::svref_2object(@_ == 0? \$_: \$_[0])
) ne "B::PV"? (
!$1 && $ref eq "B::NV"? "$k.0": $k
):
!utf8::is_utf8($k)? (
$k =~ /[^\t\n -~]/a ? _to_hex_str($k): #$base->quote($k, DBI::SQL_BINARY):
Aion::Format::to_str($k)
):
Aion::Format::to_str(_recode_cp1251($k))
}
lib/Aion/Query.pm view on Meta::CPAN
}: $base->selectall_arrayref($query, { Slice => {} });
if(defined $r and BQ) {
for my $row (@$r) {
for my $k (keys %$row) {
$row->{$k} =~ s/°([^\x7F]{1,7})\x7F/chr from_radix($1, 254)/ge if utf8::is_utf8($row->{$k});
}
}
}
$r
} else {
lib/Aion/Query.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Query - a functional interface for accessing SQL databases (MySQL, MariaDB, Postgres and SQLite)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Run.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Run - role for console commands
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Spirit.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Spirit - functions for controlling the program execution process
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Surf.pm view on Meta::CPAN
my $json = delete $set{json};
$json = $data, undef $data if not defined $json and ref $data eq "HASH";
if(defined $json) {
$validate_data->();
$request->header('Content-Type' => 'application/json; charset=utf-8');
$data = Aion::Format::Json::to_json $json;
utf8::encode($data) if utf8::is_utf8($data);
$request->content($data);
}
my $form = delete $set{form};
$form = $data, undef $data if not defined $form and ref $data eq "ARRAY";
lib/Aion/Surf.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Surf - surfing by internet
lib/Aion/Surf.pm view on Meta::CPAN
=over
=item * C<query> - add query params to C<$url>.
=item * C<json> - body request set in json format. Add header C<Content-Type: application/json; charset=utf-8>.
=item * C<form> - body request set in url params format. Add header C<Content-Type: application/x-www-form-urlencoded>.
=item * C<headers> - add headers. If C<header> is array ref, then add in the order specified. If C<header> is hash ref, then add in the alphabet order.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Telemetry.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion::Telemetry - measures the time the program runs between specified points
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Aion - a postmodern object system for Perl 5, such as âMouseâ, âMooseâ, âMooâ, âMoâ and âMâ, but with improvements
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Akado/Account.pm view on Meta::CPAN
# ABSTRACT: get internet provider Akado account info
use strict;
use warnings FATAL => 'all';
use utf8;
use Carp;
use Digest::MD5 qw(md5_hex);
use HTTP::Request::Common;
use LWP;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Akamai/Open/Client.pm view on Meta::CPAN
__END__
=pod
=encoding utf-8
=head1 NAME
Akamai::Open::Client - The Akamai Open API Perl client structure for authentication data
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Akamai/Open/DiagnosticTools.pm view on Meta::CPAN
__END__
=pod
=encoding utf-8
=head1 NAME
Akamai::Open::DiagnosticTools - The Akamai Open DiagnosticTools API Perl client
view all matches for this distribution
view release on metacpan or search on metacpan
script/album view on Meta::CPAN
# Use jpegtran to rotate jpg files.
if ( ($el->file_ext || "") eq "jpg" && $prog_jpegtran ) {
my $cmd = "$prog_jpegtran -copy all -rotate " . $el->rotation . " ";
$cmd .= $el->mirror eq 'h' ? "-transpose " : "-transverse "
if $el->mirror;
$cmd .= "-outfile " . squote($i_large) .
" " . squote($i_src);
my $t = `$cmd 2>&1`;
$msg->($t) if $t;
utime($time, $time, $i_large);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/AM/DataSet.pm view on Meta::CPAN
# string representing null feature, field separator (class,
# features, comment) and feature separator
sub _read_data_sub {
my ($data_file, $unknown, $null,
$field_sep, $feature_sep) = @_;
my $data_fh = $data_file->openr_utf8;
my $line_num = 0;
return sub {
my $line;
# grab the next non-blank line from the file
while($line = <$data_fh>){
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Repository.pm view on Meta::CPAN
}
1;
__END__
=encoding utf-8
#line 128
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/AdaGrad.pm view on Meta::CPAN
1;
__END__
=encoding utf-8
=head1 NAME
Algorithm::AdaGrad - AdaGrad learning algorithm.
view all matches for this distribution
view release on metacpan or search on metacpan
t/SearchMachine.t view on Meta::CPAN
$rv = $machine->feed("Un chasseur qui sache chasser ne chase jamais sans son chien", \&count);
ok(!defined($rv));
is($counter, 6);
if ($Config{api_version} >= 8) {
use utf8;
$machine = Algorithm::AhoCorasick::SearchMachine->new("pÅe");
$expected_pos = 12;
$expected_keyword = "pÅe";
$machine->feed("skákal pes, pÅes oves", \&check);
view all matches for this distribution