view release on metacpan or search on metacpan
inc/Inline.pm view on Meta::CPAN
my $next = 0;
for (@config) {
next if $next++ % 2;
croak M02_usage() if /[\s\n]/;
}
$o = bless {}, $class;
$o->{INLINE}{version} = $VERSION;
$o->{API}{pkg} = $pkg;
$o->{API}{script} = $script;
$o->{API}{language_id} = $language_id;
if ($option =~ /^(FILE|BELOW)$/i or
inc/Inline.pm view on Meta::CPAN
my $next = 0;
for (@config) {
next if $next++ % 2;
croak M03_usage_bind() if /[\s\n]/;
}
$o = bless {}, $class;
$o->{INLINE}{version} = $VERSION;
$o->{API}{pkg} = $pkg;
$o->{API}{script} = $script;
$o->{API}{language_id} = $language_id;
$o->receive_code($code);
inc/Inline.pm view on Meta::CPAN
or $o->{CONFIG}{PRINT_INFO}
) {
eval "require $o->{INLINE}{ILSM_module}";
croak M05_error_eval('glue', $@) if $@;
$o->push_overrides;
bless $o, $o->{INLINE}{ILSM_module};
$o->validate(@config);
}
else {
$o->{CONFIG} = {(%{$o->{CONFIG}}, @config)};
}
inc/Inline.pm view on Meta::CPAN
ref($o) eq 'Inline'
) {
eval "require $o->{INLINE}{ILSM_module}";
croak M05_error_eval('glue', $@) if $@;
$o->push_overrides;
bless $o, $o->{INLINE}{ILSM_module};
$o->validate(@config);
}
$o->load;
$o->pop_overrides;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/FFI.pm view on Meta::CPAN
sub new
{
my($class) = @_;
bless {}, $class;
}
my $pkg_config;
foreach my $try ($ENV{PKG_CONFIG}, 'pkg-config', 'pkgconf')
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Uploader.pm view on Meta::CPAN
sub new {
my ($class, $arg) = @_;
$arg->{$_} or Carp::croak("missing $_ argument") for qw(user password);
bless $arg => $class;
}
=method read_config_file
my $config = CPAN::Uploader->read_config_file( $filename );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CWB/CL.pm view on Meta::CPAN
local($Carp::CarpLevel) = 1; # call has been delegated from attribute() method of CWB::CL::Corpus object
croak("Can't access p-attribute $corpusName.$name (aborted)")
if CWB::CL::strict(); # CL library doesn't set error code in cl_new_attribute() function
return undef;
}
return bless($ptr, $class); # objects are just opaque containers for (Attribute *) pointers
}
sub DESTROY {
my $self = shift;
lib/CWB/CL.pm view on Meta::CPAN
local($Carp::CarpLevel) = 1; # call has been delegated from attribute() method of CWB::CL::Corpus object
croak("Can't access s-attribute $corpusName.$name (aborted)")
if CWB::CL::strict(); # CL library doesn't set error code in cl_new_attribute() function
return undef;
}
return bless($ptr, $class);
}
sub DESTROY {
my $self = shift;
lib/CWB/CL.pm view on Meta::CPAN
local($Carp::CarpLevel) = 1; # call has been delegated from attribute() method of CWB::CL::Corpus object
croak("Can't access a-attribute $corpusName.$name (aborted)")
if CWB::CL::strict(); # CL library doesn't set error code in cl_new_attribute() function
return undef;
}
return bless($ptr, $class);
}
sub DESTROY {
my $self = shift;
lib/CWB/CL.pm view on Meta::CPAN
if CWB::CL::strict(); # CL library doesn't set error code in cl_new_corpus() function
return undef;
}
$self->{'ptr'} = $ptr;
$self->{'name'} = $corpusname;
return bless($self, $class);
}
sub DESTROY {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
}
my $fh = CWB::OpenFile "> $name";
$self->{NAME} = $name;
$self->{FH} = $fh;
$self->{STATUS} = "W"; # W = writing, F = finished, R = reading, D = deleted
return bless($self, $class);
}
sub DESTROY {
my $self = shift;
if ($self->{STATUS} ne "D") {
COMMENTS => {}, # comments and/or blank lines preceding each content line
# (att => [comment1, comment2, ...], ':NAME' => [...], '::property' => ...)
LINECOMMENT => {}, # line comments on content lines (att => comment, ':NAME' => comment, ...)
FILENAME => undef, # filename of registry file (if loaded from file)
};
bless($self, $class);
# if filename was specified, try loading registry entry (searches in registry directories if necessary)
if (defined $filename) {
if ($filename !~ /\// and not -f $filename) {
my @dirs = CWB::RegistryDirectory();
view all matches for this distribution
view release on metacpan or search on metacpan
KEY_atan2|5.003007||Viu
KEY_AUTOLOAD|5.003007||Viu
KEY_BEGIN|5.003007||Viu
KEY_bind|5.003007||Viu
KEY_binmode|5.003007||Viu
KEY_bless|5.003007||Viu
KEY_break|5.027008||Viu
KEY_caller|5.003007||Viu
KEY_catch|5.033007||Viu
KEY_chdir|5.003007||Viu
KEY_CHECK|5.006000||Viu
SvAMAGIC_on|5.003007|5.003007|nu
SvANY|5.003007||Viu
SvARENA_CHAIN_SET|||Viu
SvARENA_CHAIN|||Viu
sv_backoff|5.003007|5.003007|n
sv_bless|5.003007|5.003007|
sv_buf_to_ro|5.019008||Viu
sv_buf_to_rw|5.019008||Viu
SvCANCOW|5.017007||Viu
SvCANEXISTDELETE|5.011000||Viu
SV_CATBYTES|5.021005|5.021005|
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crypt/RSA.pm view on Meta::CPAN
sub new {
my ($class, %params) = @_;
my %self = (%DEFAULTS, %params);
my $self = bless \%self, $class;
$self->_storemap (%KNOWNMAP);
for (qw(ES SS PP)) {
$$self{$_} = { Name => $$self{$_} . "_$_" } unless ref $$self{$_};
$$self{lc($_)} = $self->_load ( %{$$self{$_}} );
}
$$self{keychain} = new Crypt::RSA::Key;
return bless \%self, $class;
}
sub keygen {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Date/Extract.pm view on Meta::CPAN
&& $args{prefers} ne 'past'
&& $args{prefers} ne 'future') {
_croak "Invalid `prefers` passed to constructor: expected `nearest', `past', or `future'.";
}
my $self = bless \%args, ref($class) || $class;
return $self;
}
# This method will combine the arguments of parser->new and extract. Modify the
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Inline.pm view on Meta::CPAN
my $next = 0;
for (@config) {
next if $next++ % 2;
croak M02_usage() if /[\s\n]/;
}
$o = bless {}, $class;
$o->{INLINE}{version} = $VERSION;
$o->{API}{pkg} = $pkg;
$o->{API}{script} = $script;
$o->{API}{language_id} = $language_id;
if ($option =~ /^(FILE|BELOW)$/i or
inc/Inline.pm view on Meta::CPAN
my $next = 0;
for (@config) {
next if $next++ % 2;
croak M03_usage_bind() if /[\s\n]/;
}
$o = bless {}, $class;
$o->{INLINE}{version} = $VERSION;
$o->{API}{pkg} = $pkg;
$o->{API}{script} = $script;
$o->{API}{language_id} = $language_id;
$o->receive_code($code);
inc/Inline.pm view on Meta::CPAN
or $o->{CONFIG}{PRINT_INFO}
) {
eval "require $o->{INLINE}{ILSM_module}";
croak M05_error_eval('glue', $@) if $@;
$o->push_overrides;
bless $o, $o->{INLINE}{ILSM_module};
$o->validate(@config);
}
else {
$o->{CONFIG} = {(%{$o->{CONFIG}}, @config)};
}
inc/Inline.pm view on Meta::CPAN
ref($o) eq 'Inline'
) {
eval "require $o->{INLINE}{ILSM_module}";
croak M05_error_eval('glue', $@) if $@;
$o->push_overrides;
bless $o, $o->{INLINE}{ILSM_module};
$o->validate(@config);
}
$o->load;
$o->pop_overrides;
}
view all matches for this distribution
view release on metacpan or search on metacpan
new_md5_ctx(pTHX_ MD5_COMPAT_CTX *context, const char *sclass)
{
SV *sv = newSV(0);
SV *obj = newRV_noinc(sv);
sv_bless(obj, gv_stashpv(sclass, 0));
sv_magicext(sv, NULL, PERL_MAGIC_ext, &vtbl_md5, (const char *)context, 0);
#if defined(USE_ITHREADS) && defined(MGf_DUP)
SvMAGIC(sv)->mg_flags |= MGf_DUP;
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
t/ffi_raw_ptr.t view on Meta::CPAN
$shared, 'foo_new',
FFI::Raw::ptr
)->coderef;
sub new {
bless shift->SUPER::new(_foo_new());
}
*get_bar = FFI::Raw->new(
$shared, 'foo_get_bar',
FFI::Raw::int,
view all matches for this distribution
view release on metacpan or search on metacpan
my($signature, $sub) = @_;
my $ffi = _ffi($signature);
my($ret_type, @args_types) = map { $typemap{$_} } split //, $signature;
my $type = '(' . join(',', @args_types) . ')->' . $ret_type;
my $closure = $ffi->closure($sub);
bless {
addr => $ffi->cast($type => 'opaque', $closure),
sub => $sub,
closure => $closure,
}, 'FFI::Callback';
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Pegex/Base.pm view on Meta::CPAN
package Pegex::Base;
# use Mo qw'build default builder xxx import nonlazy required';
# The following line of code was produced from the previous line by
# Mo::Inline version 0.38
no warnings;my$M=__PACKAGE__.'::';*{$M.Object::new}=sub{my$c=shift;my$s=bless{@_},$c;my%n=%{$c.'::'.':E'};map{$s->{$_}=$n{$_}->()if!exists$s->{$_}}keys%n;$s};*{$M.import}=sub{import warnings;$^H|=1538;my($P,%e,%o)=caller.'::';shift;eval"no Mo::$_",&{...
our $DumpModule = 'YAML';
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/array_type.t view on Meta::CPAN
isnt $@, "";
eval q{use Lexical::Var '@foo' => \[];};
isnt $@, "";
eval q{use Lexical::Var '@foo' => \"abc";};
isnt $@, "";
eval q{use Lexical::Var '@foo' => bless(\(my$x="abc"));};
isnt $@, "";
eval q{use Lexical::Var '@foo' => \*main::wibble;};
isnt $@, "";
eval q{use Lexical::Var '@foo' => bless(\*main::wibble);};
isnt $@, "";
eval q{use Lexical::Var '@foo' => qr/xyz/;};
isnt $@, "";
eval q{use Lexical::Var '@foo' => bless(qr/xyz/);};
isnt $@, "";
eval q{use Lexical::Var '@foo' => [];};
is $@, "";
eval q{use Lexical::Var '@foo' => bless([]);};
is $@, "";
eval q{use Lexical::Var '@foo' => {};};
isnt $@, "";
eval q{use Lexical::Var '@foo' => bless({});};
isnt $@, "";
eval q{use Lexical::Var '@foo' => sub{};};
isnt $@, "";
eval q{use Lexical::Var '@foo' => bless(sub{});};
isnt $@, "";
eval q{use Lexical::Var '@foo' => []; @foo if 0;};
is $@, "";
eval q{use Lexical::Var '@foo' => bless([]); @foo if 0;};
is $@, "";
1;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Capture/Tiny.pm view on Meta::CPAN
use Carp ();
use Exporter ();
use IO::Handle ();
use File::Spec ();
use File::Temp qw/tempfile tmpnam/;
use Scalar::Util qw/reftype blessed/;
# Get PerlIO or fake it
BEGIN {
local $@;
eval { require PerlIO; PerlIO->can('get_layers') }
or *PerlIO::get_layers = sub { return () };
inc/Capture/Tiny.pm view on Meta::CPAN
unless @opts % 2 == 0;
my $stash = { capture => { @opts } };
for ( keys %{$stash->{capture}} ) {
my $fh = $stash->{capture}{$_};
Carp::confess "Custom handle for $_ must be seekable\n"
unless ref($fh) eq 'GLOB' || (blessed($fh) && $fh->isa("IO::Seekable"));
}
# save existing filehandles and setup captures
local *CT_ORIG_STDIN = *STDIN ;
local *CT_ORIG_STDOUT = *STDOUT;
local *CT_ORIG_STDERR = *STDERR;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Module/Runtime.pm view on Meta::CPAN
# %^H state leaking into each required module, polluting the
# module's lexical state.
local %^H if _WORK_AROUND_HINT_LEAKAGE;
if(_WORK_AROUND_BROKEN_MODULE_STATE) {
my $notional_filename = &module_notional_filename;
my $guard = bless([ $notional_filename ],
"Module::Runtime::__GUARD__");
my $result = CORE::require($notional_filename);
pop @$guard;
return $result;
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/NewRelic/Agent/FFI.pm view on Meta::CPAN
if (%args) {
require Carp;
Carp::croak("Invalid arguments: @{[ keys %args ]}");
}
bless {
license_key => $license_key,
app_name => $app_name,
app_language => $app_language,
app_language_version => $app_language_version,
}, $class;
view all matches for this distribution
view release on metacpan or search on metacpan
t/Test/Builder.pm view on Meta::CPAN
=cut
sub create {
my $class = shift;
my $self = bless {}, $class;
$self->reset;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tickit/Style.pm view on Meta::CPAN
struct Keyset => [qw( tags style )];
sub new
{
my $class = shift;
return bless [], $class;
}
sub clone
{
my $proto = shift;
return bless [ map { Keyset( $_->tags, { %{$_->style} } ) }
@$proto ], ref $proto;
}
sub add
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alter.pm view on Meta::CPAN
=head3 Basic Functions
The functions described here accept a first argument named $obj.
Despite the name, C<$obj> can be any reference, it doesn't I<have>
to be blessed (though it usually will be). It is a fatal error
if it is not a reference or if the reference points to a read-only value.
=over
=item C<ego($obj)>
lib/Alter.pm view on Meta::CPAN
package First;
use Alter qw( alter ego);
sub new {
my $class = shift;
bless( \ my $o, $class)->init( @_);
}
sub init {
my $f = shift;
alter $f, { name => shift };
lib/Alter.pm view on Meta::CPAN
package Last;
use Alter qw( alter ego);
sub new {
my $class = shift;
bless( \ my $o, $class)->init( @_);
}
sub init {
my $l = shift;
alter $l, [ shift];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alvis/AinoDump.pm view on Meta::CPAN
my $proto=shift;
my $class=ref($proto)||$proto;
my $parent=ref($proto)&&$proto;
my $self={};
bless($self,$class);
$self->_init(@_);
$self->_set_err_state($ERR_OK);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alvis/NLPPlatform/MyReceiver.pm view on Meta::CPAN
my @stack_elements = ();
my $tab_objet = {};
my $is_in_ann;
# my $data;
return bless {"tab_object" => {} , "stack_elements" => \@stack_elements, "is_in_ann" => $is_in_ann, "counter_id" => 0 } , $type;
}
#
# process <..>
#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alvis/Logger.pm view on Meta::CPAN
my $class = shift();
#warn("new($class): \@_ = ", join(", ", map { "'$_'" } @_), "\n");
my %options = ( level => 0, stream => \*STDERR, @_ );
$options{level} = 0 if !defined $options{level};
return bless {
options => \%options,
}, $class;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alvis/QueryFilter.pm view on Meta::CPAN
my $proto=shift;
my $class=ref($proto)||$proto;
my $parent=ref($proto)&&$proto;
my $self={};
bless($self,$class);
$self->_set_err_state($ERR_OK);
$self->_init(@_);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alvis/Saa.pm view on Meta::CPAN
'my_addr' => $my_addr,
'err' => '',
'queue' => [],
};
bless $this, $class;
$SIG{'PIPE'} = 'IGNORE';
return $this;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alzabo/Display/SWF/Column.pm view on Meta::CPAN
$v->nextFrame;
my $self = { sprite => $v, width => $w, dy => undef, displayItem => undef,
is_primary_key => undef, is_foreign_key => undef,
foreign_keys => [] };
bless $self, $pkg;
return $self;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alzabo/ChangeTracker.pm view on Meta::CPAN
my $class = ref $proto || $proto;
++$STACK;
my $self = $STACK;
bless \$self, $class;
}
sub add
{
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/CloudFront/Thin.pm view on Meta::CPAN
}
else {
Carp::croak "argument '$key' missing on call to new()";
}
}
bless $self, $class;
my $ua = $args->{ua} || _default_ua();
$self->ua($ua);
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/CreatorsAPI.pm view on Meta::CPAN
if (!$opt->{ua}) {
$opt->{ua} = HTTP::Tiny->new;
}
bless +{
credential_id => $credential_id,
credential_secret => $credential_secret,
credential_version => $credential_version,
partner_tag => $opt->{partner_tag} || '',
marketplace => $opt->{marketplace} || 'www.amazon.com',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/Credentials.pm view on Meta::CPAN
sub new {
my $class = shift;
my $self = $class->SUPER::new(ref($_[0]) ? $_[0] : { @_ });
unless ( $self->get_logger ) {
$self->set_logger(bless {}, 'Amazon::Credentials::Logger');
}
unless ($self->get_user_agent) {
$self->set_user_agent(new LWP::UserAgent);
}
view all matches for this distribution