view release on metacpan or search on metacpan
lib/API/PleskExpand/Accounts.pm view on Meta::CPAN
For 'optimal', 'min_domains', 'max_diskspace' you can ask additional server group id ('group_id' params) or server keyword ('server_keyword' param);
Return (Data::Dumper output):
VAR1 = bless( {
'answer_data' => [ {
'server_id' => '1',
'status' => 'ok',
'expiration' => '-1',
'tmpl_id' => '1',
lib/API/PleskExpand/Accounts.pm view on Meta::CPAN
id -- client id
Return:
$VAR1 = bless( {
'answer_data' => [ {
'server_id' => '1',
'status' => 'ok',
'tmpl_id' => '1',
'id' => '15',
lib/API/PleskExpand/Accounts.pm view on Meta::CPAN
Params:
id -- client id in Plesk
Return:
$VAR1 = bless( {
'answer_data' => [ {
'server_id' => '1',
'status' => 'ok',
'id' => '15'
} ],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/PureStorage.pm view on Meta::CPAN
my $self = {
cookie_file => '/tmp/cookies.txt',
host => $_[0],
token => $_[1]
};
bless $self, $class;
my $client = REST::Client->new( follow => 1 );
$client->setHost('https://'.$self->{host});
$client->addHeader('Content-Type', 'application/json');
view all matches for this distribution
view release on metacpan or search on metacpan
ReviewBoard.pm view on Meta::CPAN
# extract cookie from response header
$self->{_cookie_jar}->extract_cookies($response);
bless $self,$class;
return $self;
}
=head2 $rb->getReviewBoardLink(changenum => '112345');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Vultr.pm view on Meta::CPAN
qq{You must specify an API key when creating an instance of API::Vultr}
unless exists $args{api_key};
my $self = { %args, ua => LWP::UserAgent->new( timeout => 10 ) };
return bless( $self, __PACKAGE__ );
}
# ACCOUNT #
sub get_account_info {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APISchema/Generator/Markdown.pm view on Meta::CPAN
my ($class) = @_;
my $renderer = Text::MicroTemplate::DataSection->new(
escape_func => undef
);
bless {
renderer => $renderer,
map {
( $_ => $renderer->build_file($_) );
} qw(index toc route resource request response
request_example response_example),
view all matches for this distribution
view release on metacpan or search on metacpan
lib/APP/REST/ParallelMyUA.pm view on Meta::CPAN
sub new {
my ( $proto, %args ) = @_;
my $class = ref($proto) || $proto;
my $self;
$self = bless $proto->SUPER::new(%args), $class;
return $self;
}
=head2 on_connect
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/APR/HTTP/Headers/Compat.pm view on Meta::CPAN
sub new {
my ( $class, $table ) = ( shift, shift );
my %self = %{ $class->SUPER::new( @_ ) };
tie %self, 'APR::HTTP::Headers::Compat::MagicHash', $table, %self;
return bless \%self, $class;
}
sub _magic { tied %{ shift() } }
=head2 C<< clone >>
lib/APR/HTTP/Headers/Compat.pm view on Meta::CPAN
Clone this object. The clone is a regular L<HTTP::Headers> object rather
than an C<APR::HTTP::Headers::Compat>.
=cut
sub clone { bless { %{ shift() } }, 'HTTP::Headers' }
=head2 C<< table >>
Get the underlying L<APR::Table> object. Changes made in either the
table or the wrapper are reflected immediately in the other.
lib/APR/HTTP/Headers/Compat.pm view on Meta::CPAN
my $self = shift;
return $self->SUPER::remove_content_headers( @_ )
unless defined wantarray;
# This gets nasty. We downbless ourself to be an HTTP::Headers so that
# when HTTP::Headers->remove_content_headers does
#
# my $c = ref( $self )->new
#
# it creates a new HTTP::Headers instead of attempting to create a
# new APR::HTTP::Headers::Compat.
my $class = ref $self;
bless $self, 'HTTP::Headers';
# Calls SUPER::remove_content_headers due to rebless
my $other = $self->remove_content_headers( @_ );
bless $self, $class;
# Return a non-magic HTTP::Headers
return $other;
}
view all matches for this distribution
view release on metacpan or search on metacpan
logdestination => 'syslog', # Where should all the log output go to ('stderr','syslog')
};
}
## Constructor.
## Initializes the object and returns it blessed.
## For all sub classes, please override C<_Init> to check the
## parameter which are passed to the C<new> function. This
## is necessary because you are not able to call the the new method of a
## parent class, when having a class name (new $class::SUPER::new, does not work.).
##in> %hash, key => val, ...
##out> blessed object of the class
##eg> my $this = new Arc::Class ( key => value, key2 => value2 );
sub new
{
my $this = shift;
my $class = ref($this) || $this;
my $self = bless { },$class;
$self->_Init(@_);
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ARS/Simple.pm view on Meta::CPAN
{
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = {};
bless($self, $class);
# Run initialisation code
$self->_init(@_);
return $self;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ARSObject.pm view on Meta::CPAN
#,-fphc=>{} # CGI fields cache
#,-fphd=>{} # DB fields cache
#,-fpbv=>[] # buffer values
#,-fpbn=>'' # buffer name == record common name
};
bless $s,$c;
set($s, @_);
$s->{-storable} =eval('use Storable; 1') if !exists($s->{-storable});
$s
}
view all matches for this distribution
view release on metacpan or search on metacpan
# by simply referring to the $ars_errstr scalar.
package ARS::ERRORSTR;
sub TIESCALAR {
bless {};
}
sub FETCH {
my($s, $i) = (undef, undef);
my(%mTypes) = ( 0 => "OK", 1 => "WARNING", 2 => "ERROR", 3 => "FATAL",
4 => "INTERNAL ERROR",
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ASNMTAP/Asnmtap.pm view on Meta::CPAN
while (my ($k, $v) = splice(@parameters, 0, 2)) {
$array[$array[0]{$k} = @array] = $v;
}
bless(\@array, $classname);
};
}
my %args = @_;
lib/ASNMTAP/Asnmtap.pm view on Meta::CPAN
if ( defined $self->{_programVersion} ) {
$self->{_programVersion} =~ s/^\$Revision: //;
$self->{_programVersion} =~ s/ \$\s*$//;
}
bless ($self, $classname);
$self->_init(\%args);
$self->_getOptions();
return ($self);
}
view all matches for this distribution
view release on metacpan or search on metacpan
NextLink.pm view on Meta::CPAN
sub new {
my $class = shift;
die "Cannot call class method on an object" if ref $class;
my $linkfile = $main::Server->MapPath( shift );
my $self = {};
bless $self, $class;
$self->parse_linkfile( $linkfile );
$self;
}
sub parse_linkfile {
view all matches for this distribution
view release on metacpan or search on metacpan
package ASP::IO;
sub TIEHANDLE { shift->new(@_) }
sub PRINT { shift->print(@_) }
sub PRINTF { shift->print(sprintf(@_)) }
sub new { bless {}, shift; }
sub print {
my $self = shift;
ASP::Print(@_);
1;
}
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
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
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
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
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
Memoize::memoize('AUBBC::script_escape');
Memoize::memoize('AUBBC::html_to_text');
}
$aubbc_error .= $@."\n" if $@;
}
return bless {};
}
sub DESTROY {
warn 'DESTROY AUBBC '.$VERSION if $DEBUG_AUBBC;
}
view all matches for this distribution
view release on metacpan or search on metacpan
croak("Unable to allocate AVL tree traversal");
hv_store(hash, "trav", 4, newSViv(PTR2IV(trav)), 0);
self = newRV_noinc((SV*)hash);;
sv_2mortal(self);
sv_bless(self, gv_stashpv(class, FALSE));
PUSHs(self);
XSRETURN(1);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/CLI/Config.pm view on Meta::CPAN
use warnings;
sub new {
my $class = shift;
my $data = @_ ? @_ > 1 ? { @_ } : shift : {};
return bless $data, $class;
}
sub AUTOLOAD {
our $AUTOLOAD;
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/CLIWrapper.pm view on Meta::CPAN
use String::ShellQuote;
use Carp;
our $Error = { Message => '', Code => '' };
our $true = do { bless \(my $dummy = 1), "AWS::CLIWrapper::Boolean" };
our $false = do { bless \(my $dummy = 0), "AWS::CLIWrapper::Boolean" };
my $AWSCLI_VERSION = undef;
my $DEFAULT_CATCH_ERROR_RETRIES = 3;
my $DEFAULT_CATCH_ERROR_MIN_DELAY = 3;
my $DEFAULT_CATCH_ERROR_MAX_DELAY = 10;
lib/AWS/CLIWrapper.pm view on Meta::CPAN
if (my $v = delete $param{$k}) {
push @opt, param2opt($k, $v);
}
}
my $self = bless {
region => $region,
opt => \@opt,
json => JSON->new,
param => \%param,
awscli_path => $param{awscli_path} || 'aws',
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/AWS/IP.pm view on Meta::CPAN
&& $cache_timeout_secs =~ /^[0-9]+$/)
{
croak 'Error argument cache_timeout_secs must be a positive integer';
}
bless {
cache => Cache::File->new( cache_root => ($cache_path || tempdir()),
lock_level => Cache::File::LOCK_LOCAL(),
default_expires => "$cache_timeout_secs sec"),
}, $class;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/Lambda/Bootstrap.pm view on Meta::CPAN
use JSON::XS qw/decode_json encode_json/;
use Try::Tiny;
use AWS::Lambda;
use AWS::Lambda::Context;
use AWS::Lambda::ResponseWriter;
use Scalar::Util qw(blessed);
use Exporter 'import';
our @EXPORT = ('bootstrap');
sub bootstrap {
lib/AWS/Lambda/Bootstrap.pm view on Meta::CPAN
my $api_version = '2018-06-01';
my $env_handler = $args{handler} // $ENV{'_HANDLER'} // die '$_HANDLER is not found';
my ($handler, $function) = split(/[.]/, $env_handler, 2);
my $runtime_api = $args{runtime_api} // $ENV{'AWS_LAMBDA_RUNTIME_API'} // die '$AWS_LAMBDA_RUNTIME_API is not found';
my $task_root = $args{task_root} // $ENV{'LAMBDA_TASK_ROOT'} // die '$LAMBDA_TASK_ROOT is not found';
my $self = bless +{
task_root => $task_root,
handler => $handler,
function_name => $function,
runtime_api => $runtime_api,
api_version => $api_version,
lib/AWS/Lambda/Bootstrap.pm view on Meta::CPAN
$self->{function}->($payload, $context);
} catch {
my $err = $_;
print STDERR "$err";
$self->lambda_error($err, $context);
bless {}, 'AWS::Lambda::ErrorSentinel';
};
my $ref = ref($response);
if ($ref eq 'AWS::Lambda::ErrorSentinel') {
return;
}
lib/AWS/Lambda/Bootstrap.pm view on Meta::CPAN
my ($error, $context) = @_;
my $runtime_api = $self->{runtime_api};
my $api_version = $self->{api_version};
my $request_id = $context->aws_request_id;
my $url = "http://${runtime_api}/${api_version}/runtime/invocation/${request_id}/error";
my $type = blessed($error) // "Error";
my $resp = $self->{http}->post($url, {
content => encode_json({
errorMessage => "$error",
errorType => "$type",
}),
lib/AWS/Lambda/Bootstrap.pm view on Meta::CPAN
my $self = shift;
my $error = shift;
my $runtime_api = $self->{runtime_api};
my $api_version = $self->{api_version};
my $url = "http://${runtime_api}/${api_version}/runtime/init/error";
my $type = blessed($error) // "Error";
my $resp = $self->{http}->post($url, {
content => encode_json({
errorMessage => "$error",
errorType => "$type",
}),
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/S3/FileIterator.pm view on Meta::CPAN
use AWS::S3::File;
sub new {
my ($class, %args) = @_;
my $s = bless {
data => [ ],
page_number => 0,
idx => 0,
%args,
}, $class;
view all matches for this distribution
view release on metacpan or search on metacpan
our @log = ();
sub new
{
my ($class, %args ) = @_;
return bless \%args, $class;
}
sub Publish
{
my ($s, $msg) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/SNS/Verify.pm view on Meta::CPAN
return $url_string;
}
sub TO_JSON {
my $self = shift;
return unbless($self);
}
=head1 NAME
AWS::SNS::Verify - Verifies authenticity of SNS messages.
view all matches for this distribution