view release on metacpan or search on metacpan
bin/agent_net.pl view on Meta::CPAN
=back
=head1 DESCRIPTION
B<agent_net> will start a TCLI Agent running on the XMPP Transport
with the Net, Tail and XMPP packages loaded.
Use B<agent_net> as is or as the basis for creating Agents with different
functionaity.
bin/agent_net.pl view on Meta::CPAN
},
);
print "Starting ".$alias unless $verbose;
# Required to start the Agent
POE::Kernel->run();
print" FINISHED\n";
exit;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/agent_tail.pl view on Meta::CPAN
=back
=head1 DESCRIPTION
B<agent_tail> will start a TCLI Agent running on the XMPP Transport
with the Tail and XMPP packages loaded.
Use B<agent_tail> as is or as the basis for creating Agents with different
functionaity.
bin/agent_tail.pl view on Meta::CPAN
},
);
print "Starting ".$alias unless $verbose;
# Required to start the Agent
POE::Kernel->run();
print" FINISHED";
exit;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/dcalc.pl view on Meta::CPAN
} elsif ($arg =~ /-t/i) {
$args{'Thread'} = 1;
}
}
unless ((keys(%hosts)) > 0) { print $usage; exit 1; }
print "starting distributed calculation agent system.\n";
# get a TCP transport address:
my $tcp = new Agent::Transport(
Medium => 'TCP',
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Query.pm view on Meta::CPAN
($_[0], $_[1]) = base_connect(default_connect_options) if !$base;
return;
}
# РеÑÑаÑÑ ÐºÐ¾Ð½Ð½ÐµÐºÑа
sub connect_restart {
my ($base, $base_connection_id) = @_;
$base->disconnect if $base;
($_[0], $_[1]) = base_connect(default_connect_options());
return;
}
lib/Aion/Query.pm view on Meta::CPAN
$old_base->ping # -> 1
connect_respavn $Aion::Query::base, $Aion::Query::base_connection_id;
$old_base # -> $Aion::Query::base
=head2 connect_restart ($base)
Restarting the connection.
my $connection_id = $Aion::Query::base_connection_id;
my $base = $Aion::Query::base;
connect_restart $Aion::Query::base, $Aion::Query::base_connection_id;
$base->ping # -> 0
$Aion::Query::base->ping # -> 1
=head2 query_stop()
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Types.pm view on Meta::CPAN
subtype "Version", as &Value, where { "VSTRING" eq ref \$_ };
subtype "Str", as &Value, where { "SCALAR" eq ref \$_ };
subtype "Uni", as &Str, where { utf8::is_utf8($_) || /[\x80-\xFF]/a };
subtype "Bin", as &Str, where { !utf8::is_utf8($_) && !/[\x80-\xFF]/a };
subtype "NonEmptyStr", as &Str, where { /\S/ };
subtype "StartsWith[start]", as &Str,
init_where { M = qr/^${\ quotemeta A}/ },
where { $_ =~ M };
subtype "EndsWith[end]", as &Str,
init_where { N = qr/${\ quotemeta A}$/ },
where { $_ =~ N };
lib/Aion/Types.pm view on Meta::CPAN
Version
Str
Uni
Bin
NonEmptyStr
StartsWith[start]
EndsWith[end]
Email
Tel
Url
Path
lib/Aion/Types.pm view on Meta::CPAN
"â" ~~ Bin # -> ""
do {no utf8; "â" ~~ Bin } # -> ""
=head2 StartsWith[begin]
The line starts with C<begin>.
"Hi, world!" ~~ StartsWith["Hi,"]; # -> 1
"Hi world!" ~~ StartsWith["Hi,"]; # -> ""
=head2 EndsWith[end]
lib/Aion/Types.pm view on Meta::CPAN
"http://" ~~ Url # -> 1
"http:/" ~~ Url # -> ""
=head2 Path
Paths start with a slash.
"/" ~~ Path # -> 1
"/a/b" ~~ Path # -> 1
"a/b" ~~ Path # -> ""
=head2 Html
HTML starts with C<< E<lt>!doctype html >> or C<< E<lt>html >>.
"<HTML" ~~ Html # -> 1
" <html" ~~ Html # -> 1
" <!doctype html>" ~~ Html # -> 1
" <html1>" ~~ Html # -> ""
view all matches for this distribution
view release on metacpan or search on metacpan
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Akamai/PropertyFetcher.pm view on Meta::CPAN
my $properties_data = decode_json($properties_resp->decoded_content);
my $properties = $properties_data->{properties}->{items};
foreach my $property (@$properties) {
# Fork a new process for each property
$pm->start and next;
my $property_id = $property->{propertyId};
my $property_name = $property->{propertyName};
# Create a directory for the property
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Album/Tutorial.pm view on Meta::CPAN
This tutorial describes the basic use of the Album program to create
and maintain browser based photo albums.
=head1 DESCRIPTION
=head2 Getting started
To get started, create a new directory and cd to it. Create a
subdirectory 'large' and put some pictures there. If you have
installed the 'album' tool in your execution path, you can now execute
it as follows:
$ album -v
lib/Album/Tutorial.pm view on Meta::CPAN
control other settings
=back
The format of 'info.dat' is simple. Empty lines and lines starting with
a '#' are ignored. Data lines contain the name of an image file,
followed by its description. Control lines start with an '!' mark.
'album' can fill 'info.dat' for you. To obtain this, create an empty
'info.dat' file, and run 'album':
$ touch info.dat
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/AM.pm view on Meta::CPAN
);
$log->debug(${$result->config_info})
if($log->is_debug);
$result->start_time([ (localtime)[0..2] ]);
$self->_fillandcount(
$lattice_sizes, $self->linear ? 1 : 0);
$result->end_time([ (localtime)[0..2] ]);
unless ($self->{pointers}->{'grand_total'}) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Accounting.pm view on Meta::CPAN
my $result = $acc->result;
# Get result of a specific field.
my $author_accounting = $acc->result('author');
# Reset current result so we can restart
$acc->reset;
=head1 DESCRIPTION
C<Algorithm::Accounting> provide simple aggregation method to make log
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/More.pm view on Meta::CPAN
}
sub _is_module_name {
my $module = shift;
# Module names start with a letter.
# End with an alphanumeric.
# The rest is an alphanumeric or ::
$module =~ s/\b::\b//g;
return $module =~ /^[a-zA-Z]\w*$/ ? 1 : 0;
view all matches for this distribution
view release on metacpan or search on metacpan
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/AhoCorasick/XS.pm view on Meta::CPAN
# *** EARLY RELEASE - API SUBJECT TO CHANGE ***
my $ac = Algorithm::AhoCorasick::XS->new([qw(he she hers his)]);
for my $match ($ac->match_details("ahishers")) {
printf "Word %s appears from %d to %d\n", $match->{word}, $match->{start}, $match->{end};
}
# Outputs:
# Word his appears from 1 to 3
# Word she appears from 3 to 5
# Word he appears from 4 to 5
lib/Algorithm/AhoCorasick/XS.pm view on Meta::CPAN
will stop once it encounters the first match, and the rest of the string will be
ignored.
=item match_details ( INPUT )
Returns a list of hashrefs, containing the keys C<word>, C<start> and C<end>.
These correspond to an occurence of a substring - the word, start and end offset
within the string.
=back
=head1 ENCODING SUPPORT
lib/Algorithm/AhoCorasick/XS.pm view on Meta::CPAN
You can simply call C< decode('UTF-8', ...) > on the substrings to get their
Unicode versions. The offsets will be in bytes though; converting them to character
offsets in the Unicode string is a little more tricky:
use Encode qw(decode);
my $unicode_start = length(decode('UTF-8', bytes::substr($string, 0, $start)));
my $unicode_end = $start + length(decode('UTF-8', $word)) - 1;
This will be handled for you in a future version.
=head1 CAVEATS
view all matches for this distribution
view release on metacpan or search on metacpan
_invlist_union|||
_is_cur_LC_category_utf8|||
_is_in_locale_category||5.021001|
_is_uni_FOO||5.017008|
_is_uni_perl_idcont||5.017008|
_is_uni_perl_idstart||5.017007|
_is_utf8_FOO||5.017008|
_is_utf8_char_slow||5.021001|n
_is_utf8_idcont||5.021001|
_is_utf8_idstart||5.021001|
_is_utf8_mark||5.017008|
_is_utf8_perl_idcont||5.017008|
_is_utf8_perl_idstart||5.017007|
_is_utf8_xidcont||5.021001|
_is_utf8_xidstart||5.021001|
_load_PL_utf8_foldclosures|||
_make_exactf_invlist|||
_new_invlist_C_array|||
_new_invlist|||
_pMY_CXT|5.007003||p
bad_type_gv|||
bad_type_pv|||
bind_match|||
block_end||5.004000|
block_gimme||5.004000|
block_start||5.004000|
blockhook_register||5.013003|
boolSV|5.004000||p
boot_core_PerlIO|||
boot_core_UNIVERSAL|||
boot_core_mro|||
debop||5.005000|
debprofdump||5.005000|
debprof|||
debstackptrs||5.007003|
debstack||5.007003|
debug_start_match|||
deb||5.007003|v
defelem_target|||
del_sv|||
delete_eval_scope|||
delimcpy||5.004000|n
lex_next_chunk||5.011002|
lex_peek_unichar||5.011002|
lex_read_space||5.011002|
lex_read_to||5.011002|
lex_read_unichar||5.011002|
lex_start||5.009005|
lex_stuff_pvn||5.011002|
lex_stuff_pvs||5.013005|
lex_stuff_pv||5.013006|
lex_stuff_sv||5.011002|
lex_unstuff||5.011002|
pad_add_name_pv||5.015001|
pad_add_name_sv||5.015001|
pad_add_weakref|||
pad_alloc_name|||
pad_alloc|||
pad_block_start|||
pad_check_dup|||
pad_compname_type||5.009003|
pad_findlex|||
pad_findmy_pvn||5.015001|
pad_findmy_pvs||5.015001|
quadmath_format_needed|||n
quadmath_format_single|||n
re_compile||5.009005|
re_croak2|||
re_dup_guts|||
re_intuit_start||5.019001|
re_intuit_string||5.006000|
re_op_compile|||
realloc||5.007002|n
reentrant_free||5.021008|
reentrant_init||5.021008|
ssc_is_anything|||n
ssc_is_cp_posixl_init|||n
ssc_or|||
ssc_union|||
stack_grow|||
start_glob|||
start_subparse||5.004000|
stdize_locale|||
strEQ|||
strGE|||
strGT|||
strLE|||
strnNE|||
study_chunk|||
sub_crush_depth|||
sublex_done|||
sublex_push|||
sublex_start|||
sv_2bool_flags||5.013006|
sv_2bool|||
sv_2cv|||
sv_2io|||
sv_2iuv_common|||
next unless $f =~ /$match/;
print "\n=== $f ===\n\n";
my $info = 0;
if ($API{$f}{base} || $API{$f}{todo}) {
my $base = format_version($API{$f}{base} || $API{$f}{todo});
print "Supported at least starting from perl-$base.\n";
$info++;
}
if ($API{$f}{provided}) {
my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003";
print "Support by $ppport provided back to perl-$todo.\n";
const line_t ocopline = PL_copline;
COP * const ocurcop = PL_curcop;
const int oexpect = PL_expect;
#if (PERL_BCDVERSION >= 0x5004000)
utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0),
veop, modname, imop);
#elif (PERL_BCDVERSION > 0x5003000)
utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
veop, modname, imop);
#else
utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
modname, imop);
#endif
PL_expect = oexpect;
PL_copline = ocopline;
PL_curcop = ocurcop;
void
DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...)
{
va_list args;
va_start(args, ver);
vload_module(flags, name, ver, &args);
va_end(args);
}
#endif
/* Hint: newCONSTSUB
* Returns a CV* as of perl-5.7.1. This return value is not supported
* by Devel::PPPort.
*/
/* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */
#if (PERL_BCDVERSION < 0x5004063) && (PERL_BCDVERSION != 0x5004005)
#if defined(NEED_newCONSTSUB)
static void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv);
static
#else
PL_curstash = PL_curcop->cop_stash = stash;
newSUB(
#if (PERL_BCDVERSION < 0x5003022)
start_subparse(),
#elif (PERL_BCDVERSION == 0x5003022)
start_subparse(0),
#else /* 5.003_23 onwards */
start_subparse(FALSE, 0),
#endif
newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)),
newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */
newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv))
void
DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
{
va_list args;
va_start(args, pat);
sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
SvSETMAGIC(sv);
va_end(args);
}
void
DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...)
{
dTHX;
va_list args;
va_start(args, pat);
sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
SvSETMAGIC(sv);
va_end(args);
}
void
DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
{
va_list args;
va_start(args, pat);
sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
SvSETMAGIC(sv);
va_end(args);
}
void
DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...)
{
dTHX;
va_list args;
va_start(args, pat);
sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
SvSETMAGIC(sv);
va_end(args);
}
SV *sv;
va_list args;
PERL_UNUSED_ARG(err);
va_start(args, pat);
sv = vnewSVpvf(pat, &args);
va_end(args);
sv_2mortal(sv);
warn("%s", SvPV_nolen(sv));
}
#if (PERL_BCDVERSION >= 0x5006000)
#ifndef caller_cx
# if defined(NEED_caller_cx) || defined(NEED_caller_cx_GLOBAL)
static I32
DPPP_dopoptosub_at(const PERL_CONTEXT *cxstk, I32 startingblock)
{
I32 i;
for (i = startingblock; i >= 0; i--) {
register const PERL_CONTEXT * const cx = &cxstk[i];
switch (CxTYPE(cx)) {
default:
continue;
case CXt_EVAL:
* which is why the stack variable has been renamed to 'xdigit'.
*/
#ifndef grok_bin
#if defined(NEED_grok_bin)
static UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
static
#else
extern UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
#endif
#ifdef grok_bin
# undef grok_bin
#endif
#define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d)
#define Perl_grok_bin DPPP_(my_grok_bin)
#if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL)
UV
DPPP_(my_grok_bin)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
{
const char *s = start;
STRLEN len = *len_p;
UV value = 0;
NV value_nv = 0;
const UV max_div_2 = UV_MAX / 2;
|| (!overflowed && value > 0xffffffff )
#endif
) {
warn("Binary number > 0b11111111111111111111111111111111 non-portable");
}
*len_p = s - start;
if (!overflowed) {
*flags = 0;
return value;
}
*flags = PERL_SCAN_GREATER_THAN_UV_MAX;
#endif
#endif
#ifndef grok_hex
#if defined(NEED_grok_hex)
static UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
static
#else
extern UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
#endif
#ifdef grok_hex
# undef grok_hex
#endif
#define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d)
#define Perl_grok_hex DPPP_(my_grok_hex)
#if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL)
UV
DPPP_(my_grok_hex)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
{
const char *s = start;
STRLEN len = *len_p;
UV value = 0;
NV value_nv = 0;
const UV max_div_16 = UV_MAX / 16;
|| (!overflowed && value > 0xffffffff )
#endif
) {
warn("Hexadecimal number > 0xffffffff non-portable");
}
*len_p = s - start;
if (!overflowed) {
*flags = 0;
return value;
}
*flags = PERL_SCAN_GREATER_THAN_UV_MAX;
#endif
#endif
#ifndef grok_oct
#if defined(NEED_grok_oct)
static UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
static
#else
extern UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
#endif
#ifdef grok_oct
# undef grok_oct
#endif
#define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d)
#define Perl_grok_oct DPPP_(my_grok_oct)
#if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL)
UV
DPPP_(my_grok_oct)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
{
const char *s = start;
STRLEN len = *len_p;
UV value = 0;
NV value_nv = 0;
const UV max_div_8 = UV_MAX / 8;
|| (!overflowed && value > 0xffffffff )
#endif
) {
warn("Octal number > 037777777777 non-portable");
}
*len_p = s - start;
if (!overflowed) {
*flags = 0;
return value;
}
*flags = PERL_SCAN_GREATER_THAN_UV_MAX;
DPPP_(my_my_snprintf)(char *buffer, const Size_t len, const char *format, ...)
{
dTHX;
int retval;
va_list ap;
va_start(ap, format);
#ifdef HAS_VSNPRINTF
retval = vsnprintf(buffer, len, format, ap);
#else
retval = vsprintf(buffer, format, ap);
#endif
int
DPPP_(my_my_sprintf)(char *buffer, const char* pat, ...)
{
va_list args;
va_start(args, pat);
vsprintf(buffer, pat, args);
va_end(args);
return strlen(buffer);
}
#endif
#endif
#ifndef pv_pretty
#if defined(NEED_pv_pretty)
static char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags);
static
#else
extern char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags);
#endif
#ifdef pv_pretty
# undef pv_pretty
#endif
#if defined(NEED_pv_pretty) || defined(NEED_pv_pretty_GLOBAL)
char *
DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count,
const STRLEN max, char const * const start_color, char const * const end_color,
const U32 flags)
{
const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%';
STRLEN escaped;
if (dq == '"')
sv_catpvs(dsv, "\"");
else if (flags & PERL_PV_PRETTY_LTGT)
sv_catpvs(dsv, "<");
if (start_color != NULL)
sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color));
pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR);
if (end_color != NULL)
sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Backoff/RetryTimeouts.pm view on Meta::CPAN
#pod
#pod =head2 Typical scenario
#pod
#pod Here's an example scenario of the algorithm with existing defaults:
#pod
#pod $retry_algo is created, and timer starts
#pod
#pod Initial timeout is 25s
#pod
#pod 1st attempt fails instantly
#pod
lib/Algorithm/Backoff/RetryTimeouts.pm view on Meta::CPAN
#pod =head2 timeout
#pod
#pod my $timeout = $retry_algo->delay;
#pod
#pod Returns the last suggested timeout, in seconds. If no attempts have been logged,
#pod it will suggest an initial timeout to start with.
#pod
#pod This will be a floating-point number, so you may need to convert it to an integer if your
#pod timeout system doesn't support decimals.
#pod
#pod A timeout of C<-1> will be returned if C<max_actual_duration> was forcefully turned off.
lib/Algorithm/Backoff/RetryTimeouts.pm view on Meta::CPAN
}
sub _set_last_timeout {
my ($self, $delay, $timestamp) = @_;
my $start_time = $self->{_start_timestamp};
my $min_time = $self->{min_adjust_timeout};
my $max_time = $self->{max_actual_duration};
my $timeout_factor = $self->{adjust_timeout_factor};
return ($delay // 0, -1) unless defined $start_time && $max_time;
$timestamp //= $self->{_last_timestamp} // $self->{_start_timestamp};
# Calculate initial timeout
my $actual_time_used = $timestamp - $start_time;
my $actual_time_left = $max_time - $actual_time_used;
my $timeout = $actual_time_left * $timeout_factor;
# Ensure the delay+timeout time isn't going to go over the limit
$delay //= 0;
lib/Algorithm/Backoff/RetryTimeouts.pm view on Meta::CPAN
}
sub _success_or_failure {
my ($self, $is_success, $timestamp) = @_;
# If this is the first time, the _last_timestamp should be set to the start, not
# $timestamp. This will prevent issues with the first attempt causing unnecessary
# delays (ie: waiting 1.4s after the first attempt took longer than that).
$self->{_last_timestamp} //= $self->{_start_timestamp};
my $delay = $self->SUPER::_success_or_failure($is_success, $timestamp);
return $self->_set_last_timeout($delay, $timestamp);
}
lib/Algorithm/Backoff/RetryTimeouts.pm view on Meta::CPAN
=head2 Typical scenario
Here's an example scenario of the algorithm with existing defaults:
$retry_algo is created, and timer starts
Initial timeout is 25s
1st attempt fails instantly
lib/Algorithm/Backoff/RetryTimeouts.pm view on Meta::CPAN
=head2 timeout
my $timeout = $retry_algo->delay;
Returns the last suggested timeout, in seconds. If no attempts have been logged,
it will suggest an initial timeout to start with.
This will be a floating-point number, so you may need to convert it to an integer if your
timeout system doesn't support decimals.
A timeout of C<-1> will be returned if C<max_actual_duration> was forcefully turned off.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Backoff.pm view on Meta::CPAN
my $attrspec = ${"$class\::SPEC"}{new}{args};
# check known attributes
for my $arg (keys %args) {
$arg =~ /\A(_start_timestamp)\z/ and next;
$attrspec->{$arg} or die "$class: Unknown attribute '$arg'";
}
# check required attributes and set default
for my $attr (keys %$attrspec) {
if ($attrspec->{$attr}{req}) {
lib/Algorithm/Backoff.pm view on Meta::CPAN
if (exists $attrspec->{$attr}{default}) {
$args{$attr} //= $attrspec->{$attr}{default};
}
}
$args{_attempts} = 0;
$args{_start_timestamp} //= time();
bless \%args, $class;
}
sub _consider_actual_delay {
my ($self, $delay, $timestamp) = @_;
lib/Algorithm/Backoff.pm view on Meta::CPAN
$timestamp //= time();
return -1 if defined $self->{max_actual_duration} &&
$self->{max_actual_duration} > 0 &&
$timestamp - $self->{_start_timestamp} >= $self->{max_actual_duration};
$self->{_attempts}++;
return -1 if $self->{max_attempts} &&
$self->{_attempts} >= $self->{max_attempts};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/BaumWelch.pm view on Meta::CPAN
my $trans = [
[0.9, 0.1],
[0.1, 0.9],
];
# The probabilities of each state at the start of the series.
my $start = [0.5, 0.5];
# Create an Algorithm::BaumWelch object.
my $ba = Algorithm::BaumWelch->new;
# Feed in the observation series.
$ba->feed_obs($obs_series);
# Feed in the transition and emission matrices and the starting probabilities.
$ba->feed_values($trans, $emis, $start);
# Alternatively you can randomly initialise the values - pass it the number of hidden states -
# i.e. to determine the parameters we need to make a first guess).
# $ba->random_initialise(2);
# Perform the algorithm.
$ba->baum_welch;
# Use results to pass data.
# In VOID-context prints formated results to STDOUT.
# In LIST-context returns references to the predicted transition & emission matrices and the starting parameters.
$ba->results;
=cut
=head1 DESCRIPTION
lib/Algorithm/BaumWelch.pm view on Meta::CPAN
return;
}
sub feed_values {
croak qq{\nThis method expects 3 arguments.} if @_ != 4;
my ($self, $trans, $emis, $start) = @_;
croak qq{\nThis method expects 3 arguments.} if (ref $trans ne q{ARRAY} || ref $emis ne q{HASH} || ref $start ne q{ARRAY});
my $obs_tipos = $self->[0][1];
my $obs_numero = $self->[0][2];
my $t_length = &_check_trans($trans);
&_check_emis($emis, $obs_tipos, $obs_numero, $t_length);
&_check_start($start, $t_length);
$self->[1][0] = $trans;
$self->[1][1] = $emis;
$self->[1][2] = $start;
my @stop; # 0.1/1 nao faz diferenca e para|comeca (stop|start) sempre iguala = 0
for (0..$#{$trans}) { push @stop, 1 };
$self->[1][3] = [@stop];
return;
}
sub _check_start {
my ($start, $t_length) = @_;
croak qq{\nThere must be an initial probablity for each state in the start ARRAY.} if scalar @{$start} != $t_length;
for (@{$start}) { croak qq{\nThe start ARRAY values must be numeric.} if !(/^[+-]?\ *(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/) };
my $sum =0;
for (@{$start}) { $sum += $_ }
croak qq{\nThe starting probabilities must sum to 1.} if ($sum <= 0.95 || $sum >= 1.05);
return;
}
sub _check_emis {
my ($emis, $obs_tipos, $obs_numero, $t_length) = @_;
lib/Algorithm/BaumWelch.pm view on Meta::CPAN
sub random_initialise {
my ($self, $states) = @_;
my $obs_names = $self->[0][1];
my $trans = &_gera_trans($states);
my $emis = &_gera_emis($states, $obs_names);
my $start = &_gera_init($states);
$self->[1][0] = $trans;
$self->[1][1] = $emis;
$self->[1][2] = $start;
my @stop; # 0.1/1 nao faz diferenca e para|comeca (stop|start) sempre iguala = 0
for (0..$states-1) { push @stop, 1 };
$self->[1][3] = [@stop];
return;
}
lib/Algorithm/BaumWelch.pm view on Meta::CPAN
my $self = shift;
my $obs_series = $self->[0][0];
my $obs_types = $self->[0][1];
my $trans = $self->[1][0];
my $emis = $self->[1][1];
my $start = $self->[1][2];
my $stop = $self->[1][3];
my $alpha = [];
#y initialise
for (0..$#{$trans}) { $alpha->[$_][0] = $start->[$_] * $emis->{$obs_series->[0]}[$_]; }
#y not sure if i´ve extrapolated to higher-state number BW algorithm equations correctly?!?
for my $n (1..$#{$obs_series}) {
for my $s (0..$#{$trans}) {
#push @{$alpha->[$s]}, ( ( ($alpha->[0][$n-1]*$trans->[$s][0]) + ($alpha->[1][$n-1]*$trans->[$s][1]) ) * $emis->{$obs_series->[$n]}[$s] ) ;
my $sum = 0;
lib/Algorithm/BaumWelch.pm view on Meta::CPAN
}
}
my $stop_new = [];
for my $s (0..$#{$trans}) { $stop_new->[$s] = ( $p_too_state_trans->[$s][$#{$obs_series}] ) / (sum @{$p_too_state_trans->[$s]} ); }
my $start_new = [];
for my $s (0..$#{$trans}) { $start_new->[$s] = $p_too_state_trans->[$s][0]; }
$self->[1][0] = $trans_new;
$self->[1][1] = $emis_new;
$self->[1][2] = $start_new;
$self->[1][3] = $stop_new;
return;
}
lib/Algorithm/BaumWelch.pm view on Meta::CPAN
sub results {
my $self = shift;
my $trans = $self->[1][0];
my $emis = $self->[1][1];
my $start = $self->[1][2];
if (wantarray) {
return ($trans, $emis, $start);
}
else {
my $keys = $self->[0][1];
my @config = ( [15, q{}] );
push @config, (map { [ 15, q{P(...|State_}.$_.q{)} ] } (1..$#{$trans->[0]}+1));
lib/Algorithm/BaumWelch.pm view on Meta::CPAN
@config = ( [15, q{}] );
push @config, (map { [ 15, q{P(...|State_}.$_.q{)} ] } (1..$#{$trans->[0]}+1));
my $tbl1 = Text::SimpleTable->new(@config);
my $count = 0;
for my $row (@{$keys}) {
#$tbl1->row( $row, ( map { my $v = $emis->{$row}[$_]; if ($v > 1e-4 || $v < 1e4 ) { $v = sprintf(q{%.12f},$start->[$_]) } else { $v = sprintf(q{%.8e},$start->[$_]) }; $v } (0..$#{$trans->[0]}) ) );
my @data;
for my $col (0..$#{$trans->[0]}) { push @data, sprintf(q{%.8e},$emis->{$row}[$col]); }
$tbl1->row( qq{P($row|...)}, @data );
$tbl1->hr if $count != $#{$keys};
$count++;
}
print qq{\nEmission matrix.\n};
print $tbl1->draw;
undef @config;
push @config, (map { [ 15, q{State_}.$_ ] } (1..$#{$start}+1));
my $tbl2 = Text::SimpleTable->new(@config);
#my @data;
#for my $i (0..$#{$trans->[0]}) { push @data, sprintf(q{%.8e},$start->[$i]); }
#$tbl2->row(@data);
$tbl2->row( ( map { my $v = $start->[$_]; if ($v > 1e-4 && $v < 1e4 || $v == 0 ) {
$v = sprintf(q{%.12f},$start->[$_])
}
else {
$v = sprintf(q{%.8e},$start->[$_]) }; $v
} (0..$#{$trans->[0]}) ) );
print qq{\nStart probabilities.\n};
print $tbl2->draw;
}
return;
lib/Algorithm/BaumWelch.pm view on Meta::CPAN
# | | |
# | | |__'obs1'=>ARRAY REFERENCE (3) ---LONG_LIST_OF_SCALARS--- [ length = 2 ]: 0.640481492730478, 7.18630557481621e-09 [ '->[1][1]{obs1}' ]
# | | |
# | | |__'obs2'=>ARRAY REFERENCE (3) ---LONG_LIST_OF_SCALARS--- [ length = 2 ]: 0.14807014052582, 0.534390687518216 [ '->[1][1]{obs2}' ]
# | |
# | |__ARRAY REFERENCE (2) ---LONG_LIST_OF_SCALARS--- [ length = 2 ]: 4.52394236439737e-30, 1 [ '->[1][2]' ] # start conditions
# |
# |__ ARRAY REFERENCE (1) [ '->[2]' ] # perp
#
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/BellmanFord.pm view on Meta::CPAN
}
$nodeStr = $lines[$links + 1];
chomp ($nodeStr);
@nodes12 = split(',',$nodeStr);
@startNode;
@endNode;
$infinity = "122.0";
$lenOfFile = @lines;
$m = 0;
for ($t = $links + 2; $t < $lenOfFile-1; $t++) {
$lines[$t] =~/^path ([a-z]),([a-z])/;
$startEndNode[$m] = "$1,$2";
$m++;
}
foreach $pair (@startEndNode) {
$pair =~/([a-z]),([a-z])/;
$root = $1;
$destination = $2;
print "\nWelcome to My Bellman algorithm we find solution for source = $1 and destination = $2\n";
view all matches for this distribution