view release on metacpan or search on metacpan
lib/Adam.pm view on Meta::CPAN
$self->debug( join ' ', @output );
return 0;
}
sub run {
$_[0]->new_with_options unless blessed $_[0];
POE::Kernel->run;
}
1; # Magic true value required at end of module
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Adapter/Async.pm view on Meta::CPAN
=cut
sub new {
my $class = shift;
bless { @_ }, $class
}
=head2 bus
Accessor for the L<Adapter::Async::Bus> instance, will create one as
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AddressBook.pm view on Meta::CPAN
);
};
croak "Couldn't load backend `$driverName': $@" if $@;
$self->{db_name}=$type;
} else {
bless ($self,$class);
}
return $self;
}
=head2 sync
view all matches for this distribution
view release on metacpan or search on metacpan
my $class = ref ( $prototype ) || $prototype;
my $self = {};
# Create an empty object ...
bless ( $self, $class );
# Creating a new object ... (The main section)
my %control;
# Initialize what options were selected ...
my $class = ref ( $prototype ) || $prototype;
my $self = {};
# Create an empty object ...
bless ( $self, $class );
if ( ref ( $parent ) ne __PACKAGE__ ) {
die ("You must provide an ", __PACKAGE__, " object as an argument!\n");
}
view all matches for this distribution
view release on metacpan or search on metacpan
Infix2Postfix.pm view on Meta::CPAN
$self->{'numre'}='[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?';
$self->{'re'}=join('|',(map { quotemeta($_).'(?!'.quotemeta($_).')' } @{$self->{'tokens'}}),$self->{'numre'});
$self->{'ree'}=$self->{'re'}.'|.+?';
$self->{ERRSTR}='';
bless $self,$class;
return $self;
}
sub tokenize {
my $self=shift;
view all matches for this distribution
view release on metacpan or search on metacpan
eg/benchmark.pl view on Meta::CPAN
my $thing = sub {
dcReset($cvm);
$funcs[$_]->( $cvm, $_[$_] ) for 0 .. $#funcs;
$ret->( $cvm, $ptr );
};
bless $thing, $package;
}
sub load ( $path, $version = () ) {
dlLoadLibrary( guess_library_name( $path, $version ) );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Agent/TCLI/Control.pm view on Meta::CPAN
# {
# $txt .= "$attr: ".$self->$attr." \n";
# $code = 200;
# }
# # is it an object and show_method is defined?.
# elsif ( $ref =~ qr(::) && blessed( $self->$attr )
# && $show )
# {
# $txt .= "$attr: ".$self->$attr->$show."\n";
# $code = 200;
# }
# # is it an object with dump? Probably OIO.
# elsif ( $ref =~ qr(::) && blessed($self->$attr)
# && $self->$attr->can( 'dump') )
# {
# $var = $self->$attr->dump(0);
# $txt .= Dump($var)."\n";
# $code = 200;
lib/Agent/TCLI/Control.pm view on Meta::CPAN
# $txt .= "$attr ->{ $key }: ".$self->$attr->{$key}." \n";
# $code = 200;
# }
# # is it an object and show_method is defined?.
# elsif ( $subref =~ qr(::) &&
# blessed($self->$attr->{ $key }) &&
# defined($show) )
# {
# $txt .= "$attr: ".$self->$attr->{$key}->$show."\n";
# $code = 200;
# }
# # is it an object with dump? Probably OIO.
# elsif ( $subref =~ qr(::) &&
# blessed($self->$attr->{ $key }) &&
# $self->$attr->{ $key }->can( 'dump') )
# {
# $var = $self->$attr->{$key}->dump(0);
# $txt .= Dump($var)."\n";
# $code = 200;
lib/Agent/TCLI/Control.pm view on Meta::CPAN
# $txt .= "$attr ->[ $i ]: ".$val." \n";
# $code = 200;
# }
# # is it an object and show_method is defined?.
# elsif ( $subref =~ qr(::) &&
# blessed($val) &&
# defined($show) )
# {
# $txt .= "$attr: ".$val->$show."\n";
# $code = 200;
# }
# # is it an object with dump? Probably OIO.
# elsif ( $subref =~ qr(::) &&
# blessed($val) &&
# $val->can( 'dump') )
# {
# $var = $val->dump(0);
# $txt .= Dump($var)."\n";
# $code = 200;
view all matches for this distribution
view release on metacpan or search on metacpan
my $agentclass = $tom->class;
my $str =
"if ('$agentclass' && (\${$agentclass\:\:}{new})) {\n" .
" \$agent = new $agentclass(" . %args . ");\n" .
"} else {\n" .
" \$agent = {}; bless \$agent, $agentclass;\n" .
"}";
$cpt->reval($str);
print "AGENT: ", ${$cpt->varglob('agent')}, "\n";
return;
}
}
# store the agent's class in the agent itself:
${$cpt->varglob($self->{AgentVar})}->{Tom} = $tom;
bless $self, $class; # bless wrapper into Agent!
} else {
unless ($self = $tom->get_object) {
no strict;
# got no object, so create one:
my $agentclass = $tom->class();
if (($agentclass) && (${"$agentclass\:\:"}{new})) {
$self = new $agentclass(%args);
} else {
print STDERR "$agentclass\:\:new() not found!\n" if $Debug;
# we'll just bless $self into the agent's class:
$self = {};
bless $self, $agentclass;
}
}
# store the agent's class in the agent itself:
$self->{Tom} = $tom;
}
# this is not true for wrapped agents:
print "agent's class is: " . ref($self) . "\n" if $Debug > 1;
return $self; # blessed into owning agent's class!
}
##
# Inherited methods safe for use by agent objects.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Carp.pm view on Meta::CPAN
=head1 DESCRIPTION
This module replace C<$SIG{__DIE__}> to function, who added to exception stacktrace.
If exeption is string, then stacktrace added to message. And if exeption is hash (C<{}>), or object on base hash (C<bless {}, "...">), then added to it key C<STACKTRACE> with stacktrace.
Where use propagation, stacktrace do'nt added.
=head1 SUBROUTINES
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Fs.pm view on Meta::CPAN
wantarray? @ret: $count
}
# Ðе вÑ
одиÑÑ Ð² подкаÑалоги
sub noenter(@) {
bless [@_], "Aion::Fs::noenter"
}
# ÐÑзÑваеÑÑÑ Ð´Ð»Ñ Ð²ÑеÑ
оÑибок ввода-вÑвода
sub errorenter(&) {
bless shift, "Aion::Fs::errorenter"
}
# ÐÑÑÐ°Ð½Ð°Ð²Ð»Ð¸Ð²Ð°ÐµÑ find бÑдÑÑи вÑзван Ñ Ð¾Ð´Ð½Ð¾Ð³Ð¾ из его ÑилÑÑÑов, errorenter или noenter
sub find_stop() {
die bless {}, "Aion::Fs::stop"
}
# ÐÑÐ¾Ð¸Ð·Ð²Ð¾Ð´Ð¸Ñ Ð·Ð°Ð¼ÐµÐ½Ñ Ð²Ð¾ вÑеÑ
ÑказаннÑÑ
ÑайлаÑ
. ÐозвÑаÑÐ°ÐµÑ ÑÐ°Ð¹Ð»Ñ Ð² коÑоÑÑÑ
замен не бÑло
sub replace(&@) {
my $fn = shift;
lib/Aion/Fs.pm view on Meta::CPAN
ÐодклÑÑÐ°ÐµÑ C<$pkg> (еÑли он еÑÑ Ð½Ðµ бÑл подклÑÑÑн ÑеÑез C<use> или C<require>) и возвÑаÑÐ°ÐµÑ ÐµÐ³Ð¾. Ðез паÑамеÑÑа иÑполÑзÑÐµÑ C<$_>.
Файл lib/A.pm:
package A;
sub new { bless {@_}, shift }
1;
Файл lib/N.pm:
package N;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Query.pm view on Meta::CPAN
ref $k eq "HASH"?
join(", ", map { join "", $_, " = ", quote $k->{$_} } sort keys %$k):
ref $k eq "REF" && ref $$k eq "ARRAY"?
join(" ", List::Util::pairmap { join " ", "WHEN", quote $a, "THEN", quote $b } @$$k):
ref $k eq "SCALAR"? $$k:
Scalar::Util::blessed $k ? $k:
ref $k ne ""? die "Something strange: `$k`":
$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
lib/Aion/Query.pm view on Meta::CPAN
}
}
$Aion::Query::base->begin_work;
bless {}, 'Aion::Query::Transaction';
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion/Telemetry.pm view on Meta::CPAN
$REFMARKS[$#REFMARKS]->{interval} += $now - $REFMARK_LAST_TIME if @REFMARKS;
$REFMARK_LAST_TIME = $now;
push @REFMARKS, $REFMARK{$mark} //= {mark => $mark};
bless \$mark, 'Aion::Refmark'
}
# СоздаÑÑ Ð¾ÑÑÑÑ Ð¿Ð¾ ÑепеÑнÑм ÑоÑкам
sub refreport(;$) {
my ($clean) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aion.pm view on Meta::CPAN
no strict; no warnings; no diagnostics;
use common::sense;
our $VERSION = "0.4";
use Scalar::Util qw/blessed weaken/;
use Aion::Types qw//;
# Ðогда оÑÑÑеÑÑвлÑÑÑ Ð¿ÑовеÑки:
# ro - ÑолÑко пÑи вÑдаÑе
# wo - ÑолÑко пÑи ÑÑÑановке
lib/Aion.pm view on Meta::CPAN
# СоздаÑÑ ÑвойÑÑво
sub has(@) {
my $property = shift;
return exists $property->{$_[0]} if blessed $property;
my $pkg = caller;
is_aion $pkg;
my %opt = @_;
lib/Aion.pm view on Meta::CPAN
my ($cls, %value) = @_;
$cls = ref $cls || $cls;
is_aion $cls;
my $self = bless {}, $cls;
my @init;
my @required;
my @errors;
my $FEATURE = $Aion::META{$cls}{feature};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Akado/Account.pm view on Meta::CPAN
croak 'No login specified, stopped' unless $self->{login};
croak 'No password specified, stopped' unless $self->{password};
$self->{site} ||= 'https://office.akado.ru/';
bless($self, $class);
return $self;
}
sub get_balance {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Akamai/PropertyFetcher.pm view on Meta::CPAN
our $VERSION = '0.01';
sub new {
my ($class, %args) = @_;
my $self = bless {}, $class;
$self->{agent} = Akamai::Edgegrid->new(
config_file => $args{config_file} || "$ENV{HOME}/.edgerc",
section => $args{section} || "default"
);
view all matches for this distribution
view release on metacpan or search on metacpan
script/album view on Meta::CPAN
# Actualize.
$self->{file_size} = $st[7];
$self->{timestamp} = $st[9];
}
bless($self, $pkg);
}
INIT {
no strict 'refs';
for my $sub ( @std_fields, @exif_fields ) {
script/album view on Meta::CPAN
use constant CACHE_VERSION => 3;
sub new {
my ($pkg, $file) = @_;
$pkg = ref($pkg) || $pkg;
my $self = bless({}, $pkg);
if ( defined($file) ) {
$self->load($file);
if ( ($self->{_version} || 1) != CACHE_VERSION ) {
warn("Incompatible cache version " . $self->version .
" -- invalidated\n") if $verbose;
$self = bless({}, $pkg);
}
}
$self->{_version} = CACHE_VERSION;
$self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/AM/DataSet.pm view on Meta::CPAN
sub new {
my ($class, %opts) = @_;
my $new_opts = _check_opts(%opts);
my $self = bless $new_opts, $class;
$self->_init;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
$args{path} = $args{name};
$args{path} =~ s!::!/!g;
}
$args{file} ||= "$args{prefix}/$args{path}.pm";
bless(\%args, $class);
}
#line 210
sub call {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
$args{path} =~ s!::!/!g;
}
$args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm";
$args{wrote} = 0;
bless( \%args, $class );
}
sub call {
my ($self, $method) = @_;
my $obj = $self->load($method) or return;
view all matches for this distribution
view release on metacpan or search on metacpan
perlobject.map view on Meta::CPAN
# "perlobject.map" Dean Roehrich, version 19960302
#
# TYPEMAPs
#
# HV * -> unblessed Perl HV object.
# AV * -> unblessed Perl AV object.
#
# INPUT/OUTPUT maps
#
# O_* -> opaque blessed objects
# T_* -> opaque blessed or unblessed objects
#
# O_OBJECT -> link an opaque C or C++ object to a blessed Perl object.
# T_OBJECT -> link an opaque C or C++ object to an unblessed Perl object.
# O_HvRV -> a blessed Perl HV object.
# T_HvRV -> an unblessed Perl HV object.
# O_AvRV -> a blessed Perl AV object.
# T_AvRV -> an unblessed Perl AV object.
TYPEMAP
HV * T_HvRV
AV * T_AvRV
######################################################################
OUTPUT
# The Perl object is blessed into 'CLASS', which should be a
# char* having the name of the package for the blessing.
O_OBJECT
sv_setref_pv( $arg, CLASS, (void*)$var );
T_OBJECT
sv_setref_pv( $arg, Nullch, (void*)$var );
# Cannot use sv_setref_pv() because that will destroy
# the HV-ness of the object. Remember that newRV() will increment
# the refcount.
O_HvRV
$arg = sv_bless( newRV((SV*)$var), gv_stashpv(CLASS,1) );
T_HvRV
$arg = newRV((SV*)$var);
# Cannot use sv_setref_pv() because that will destroy
# the AV-ness of the object. Remember that newRV() will increment
# the refcount.
O_AvRV
$arg = sv_bless( newRV((SV*)$var), gv_stashpv(CLASS,1) );
T_AvRV
$arg = newRV((SV*)$var);
perlobject.map view on Meta::CPAN
O_OBJECT
if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
$var = ($type)SvIV((SV*)SvRV( $arg ));
else{
warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" );
XSRETURN_UNDEF;
}
T_OBJECT
if( SvROK($arg) )
perlobject.map view on Meta::CPAN
O_HvRV
if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVHV) )
$var = (HV*)SvRV( $arg );
else {
warn( \"${Package}::$func_name() -- $var is not a blessed HV reference\" );
XSRETURN_UNDEF;
}
T_HvRV
if( SvROK($arg) && (SvTYPE(SvRV($arg)) == SVt_PVHV) )
perlobject.map view on Meta::CPAN
O_AvRV
if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVAV) )
$var = (AV*)SvRV( $arg );
else {
warn( \"${Package}::$func_name() -- $var is not a blessed AV reference\" );
XSRETURN_UNDEF;
}
T_AvRV
if( SvROK($arg) && (SvTYPE(SvRV($arg)) == SVt_PVAV) )
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/AhoCorasick/SearchMachine.pm view on Meta::CPAN
$keywords{$_} = 1;
}
my $self = { keywords => [ keys %keywords ] };
bless $self, $class;
$self->_build_tree();
return $self;
}
sub _build_tree {
lib/Algorithm/AhoCorasick/SearchMachine.pm view on Meta::CPAN
my $self = { @_ };
$self->{results} = { };
$self->{transitions} = { };
weaken $self->{parent} if $self->{parent};
return bless $self, $class;
}
sub char {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
Annotate.pm view on Meta::CPAN
=cut
sub new {
my $class = shift;
my $self = bless {}, $class;
return $self;
}
sub init {
my ($self, $info, $seq) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
sv_2uv_flags||5.009001|
sv_2uv|5.004000||p
sv_add_arena|||
sv_add_backref|||
sv_backoff|||n
sv_bless|||
sv_buf_to_ro|||
sv_buf_to_rw|||
sv_cat_decode||5.008001|
sv_catpv_flags||5.013006|
sv_catpv_mg|5.004050||p
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Backoff.pm view on Meta::CPAN
$args{$attr} //= $attrspec->{$attr}{default};
}
}
$args{_attempts} = 0;
$args{_start_timestamp} //= time();
bless \%args, $class;
}
sub _consider_actual_delay {
my ($self, $delay, $timestamp) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/BaumWelch.pm view on Meta::CPAN
use version; our $VERSION = qv('0.0.2');
#r/ matrices de BW sao 1xN_states matrices - quer dizer quasi arrays - entao nao usa matrices reais. arrays são bastante
sub new {
my $class = shift;
my $self = [undef, undef, []]; bless $self, $class;
return $self;
}
sub feed_obs {
my ($self, $series) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Bayesian.pm view on Meta::CPAN
my $s = shift;
$s->{HAMSTR} = 0 if !defined $s->{HAMSTR};
$s->{SPAMSTR} = 0 if !defined $s->{SPAMSTR};
bless {storage => $s}, $self;
}
=head2 getHam
my $num = $b->getHam($word);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/BellmanFord.pm view on Meta::CPAN
$self = {
input_file => shift,
output_file => shift,
};
# Print all the values just for clarification.
bless $self, $class;
return $self;
}
sub calculate
{
open FILE, "$self->{input_file}" or die $!;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
$args{path} =~ s!::!/!g;
}
$args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm";
$args{wrote} = 0;
bless( \%args, $class );
}
sub call {
my ($self, $method) = @_;
my $obj = $self->load($method) or return;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/BinPack/2D.pm view on Meta::CPAN
sub new {
my $name = shift;
my $self = {@_};
bless $self, $name;
}
=item add_item
Adds an item to be packed into a bin.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/BinPack.pm view on Meta::CPAN
checkargs($self, qw(binsize)) or return;
$self->{bins} = [];
bless $self, $name;
}
=item add_item
Adds an item to be packed into a bin. Required named arguments are
view all matches for this distribution