view release on metacpan or search on metacpan
my $signal = $exit & 127;
my $core = $exit & 128;
$exit = $exit >> 8;
return bless {
cmd => \@args,
out => $out,
err => $err,
exit => $exit,
signal => $signal,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/bz2/Installer.pm view on Meta::CPAN
$options{alien} = 1 unless defined $options{alien};
$options{test} ||= 'compile';
die "test must be one of compile, ffi or both"
unless $options{test} =~ /^(compile|ffi|both)$/;
my $build = bless {
cflags => [],
libs => ['-lbz2'],
}, $class;
$build->test_compile_run || die $build->error if $options{test} =~ /^(compile|both)$/;
lib/Alien/bz2/Installer.pm view on Meta::CPAN
mkdir(_catdir($prefix, 'dll'));
File::Copy::copy('libbz2.so.1.0.6', _catfile($prefix, 'dll', 'libbz2.so.1.0.6'));
eval { chmod 0755, _catfile($prefix, 'dll', 'libbz2.so.1.0.6') };
}
my $build = bless {
cflags => [ "-I" . _catdir($prefix, 'include') ],
libs => [ "-L" . _catdir($prefix, 'lib'), '-lbz2' ],
prefix => $prefix,
dll_dir => [ 'dll' ],
dlls => do {
view all matches for this distribution
view release on metacpan or search on metacpan
libcares/ltmain.sh view on Meta::CPAN
func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
# FIXME: $output_objdir/$libname.filter potentially contains lots of
# 's' commands, which not all seds can handle. GNU sed should be fine
# though. Also, the filter scales superlinearly with the number of
# global variables. join(1) would be nice here, but unfortunately
# isn't a blessed tool.
$opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
func_append delfiles " $export_symbols $output_objdir/$libname.filter"
export_symbols=$output_objdir/$libname.def
$opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
fi
libcares/ltmain.sh view on Meta::CPAN
func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
# FIXME: $output_objdir/$libname.filter potentially contains lots of
# 's' commands, which not all seds can handle. GNU sed should be fine
# though. Also, the filter scales superlinearly with the number of
# global variables. join(1) would be nice here, but unfortunately
# isn't a blessed tool.
$opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
func_append delfiles " $export_symbols $output_objdir/$libname.filter"
export_symbols=$output_objdir/$libname.def
$opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
fi
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/cargo.pm view on Meta::CPAN
bin_dir => [Alien::Rust->bin_dir],
);
}
# these are for compatability with Alien::Base and not documented
sub new { return bless {}, $_[0] }
sub cflags { '' }
sub libs { '' }
sub dynamic_libs { () }
view all matches for this distribution
view release on metacpan or search on metacpan
libmaxminddb.PL view on Meta::CPAN
use File::Spec qw();
sub new {
my ($class, %attrs) = @_;
my $self = bless \%attrs, $class;
$self->{pkgconf} = $self->find_pkgconf(qw(pkgconf pkg-config));
return $self;
}
libmaxminddb.PL view on Meta::CPAN
use File::Temp qw();
sub new {
my ($class, %attrs) = @_;
my $self = bless \%attrs, $class;
my $builder = ExtUtils::CBuilder->new;
if (!$builder->have_compiler) {
warn "Error: No C compiler found\n";
die "OS unsupported\n";
libmaxminddb.PL view on Meta::CPAN
use JSON::PP qw();
sub new {
my ($class, %attrs) = @_;
my $self = bless \%attrs, $class;
return $self;
}
sub install {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/inc_Archive-Extract/Archive/Extract.pm view on Meta::CPAN
### don't know what type of file it is ###
return __PACKAGE__->_error(loc("Cannot determine file type for '%1'",
$parsed->{archive} )) unless $parsed->{type};
return bless $parsed, $class;
}
}
=head2 $ae->extract( [to => '/output/path'] )
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Align/Sequence.pm view on Meta::CPAN
our $VERSION = '0.01';
sub new {
my $class = shift;
# uncoverable condition false
bless @_ ? @_ > 1 ? {@_} : {%{$_[0]}} : {}, ref $class || $class;
}
sub align {
my ($self, $X, $Y) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AlignAid.pm view on Meta::CPAN
_program => $arg{program},
_prog_args => $arg{prog_args},
_prog_name => $arg{prog_name},
_chunk => $arg{chunk},
};
bless( $self, $class );
return ($self);
}
=head2 submit
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AlignDB/IntSpan.pm view on Meta::CPAN
sub new {
my $class = shift;
my $self = {};
$self->{edges} = [];
bless $self, $class;
$self->add(@_) if @_ > 0;
return $self;
}
sub valid {
lib/AlignDB/IntSpan.pm view on Meta::CPAN
my @sets;
my @edges = $self->edges;
while (@edges) {
my $lower = shift @edges;
my $upper = shift(@edges) - 1;
push @sets, Scalar::Util::blessed($self)->new("$lower-$upper");
}
if (@sets) {
return @sets;
}
lib/AlignDB/IntSpan.pm view on Meta::CPAN
#@returns AlignDB::IntSpan
sub copy {
my $self = shift;
my $copy = Scalar::Util::blessed($self)->new;
$copy->{edges} = [ $self->edges ];
return $copy;
}
lib/AlignDB/IntSpan.pm view on Meta::CPAN
my $self = shift;
my $offset = shift;
my $length = shift;
#@type AlignDB::IntSpan
my $slice = Scalar::Util::blessed($self)->new;
my @edges = $self->edges;
while ( @edges > 1 ) {
my ( $lower, $upper ) = @edges[ 0, 1 ];
lib/AlignDB/IntSpan.pm view on Meta::CPAN
if ( $code_ref->() ) {
push @sub_elements, $_;
}
}
my $sub_set = Scalar::Util::blessed($self)->new(@sub_elements);
return $sub_set;
}
sub map_set {
lib/AlignDB/IntSpan.pm view on Meta::CPAN
push @map_elements, $element;
}
}
}
my $map_set = Scalar::Util::blessed($self)->new(@map_elements);
return $map_set;
}
sub substr_span {
lib/AlignDB/IntSpan.pm view on Meta::CPAN
#@returns AlignDB::IntSpan
sub cover {
my $self = shift;
my $cover = Scalar::Util::blessed($self)->new;
if ( $self->is_not_empty ) {
$cover->add_pair( $self->min, $self->max );
}
return $cover;
}
#@returns AlignDB::IntSpan
sub holes {
my $self = shift;
my $holes = Scalar::Util::blessed($self)->new;
if ( $self->is_empty or $self->is_universal ) {
# empty set and universal set have no holes
}
lib/AlignDB/IntSpan.pm view on Meta::CPAN
#@returns AlignDB::IntSpan
sub inset {
my $self = shift;
my $n = shift;
my $inset = Scalar::Util::blessed($self)->new;
my @edges = $self->edges;
while (@edges) {
my $lower = shift @edges;
my $upper = shift(@edges) - 1;
if ( $lower != $self->NEG_INF ) {
lib/AlignDB/IntSpan.pm view on Meta::CPAN
#@returns AlignDB::IntSpan
sub excise {
my $self = shift;
my $minlength = shift;
my $set = Scalar::Util::blessed($self)->new;
map { $set->merge($_) } grep { $_->size >= $minlength } $self->sets;
return $set;
}
lib/AlignDB/IntSpan.pm view on Meta::CPAN
sub _find_islands_int {
my $self = shift;
my $number = shift;
my $island = Scalar::Util::blessed($self)->new;
# if $pos & 1, i.e. $pos is odd number, $val is in the set
my $pos = $self->_find_pos( $number + 1, 0 );
if ( $pos & 1 ) {
my @ranges = $self->ranges;
lib/AlignDB/IntSpan.pm view on Meta::CPAN
sub _find_islands_set {
my $self = shift;
my $supplied = shift;
my $islands = Scalar::Util::blessed($self)->new;
if ( $self->overlap($supplied) ) {
for my $subset ( $self->sets ) {
$islands->merge($subset) if $subset->overlap($supplied);
}
lib/AlignDB/IntSpan.pm view on Meta::CPAN
my $supplied = shift;
if ( ref $supplied eq __PACKAGE__ ) { # just OK
}
elsif ( Scalar::Util::Numeric::isint($supplied) ) {
$supplied = Scalar::Util::blessed($self)->new($supplied);
}
else {
Carp::confess "Don't know how to deal with input to nearest_island\n";
}
my $island = Scalar::Util::blessed($self)->new;
my $min_d;
for my $s ( $self->sets ) {
for my $ss ( $supplied->sets ) {
next if $s->overlap($ss);
my $d = $s->distance($ss);
lib/AlignDB/IntSpan.pm view on Meta::CPAN
if ( defined $supplied and ref $supplied eq __PACKAGE__ ) {
return $supplied;
}
else {
return Scalar::Util::blessed($self)->new($supplied);
}
}
# Return the index of the first element >= the supplied value.
#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
use strict;
use warnings;
use base qw( DynaLoader );
use Carp;
use Scalar::Util qw(blessed);
use Scalar::Util::Numeric qw(isint);
use overload (
q{0+} => sub { confess "Can't numerify an AlignDB::IntSpanXS\n" },
q{bool} => sub { confess "Can't bool an AlignDB::IntSpanXS\n" },
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
my @sets;
my @ranges = $self->ranges;
while (@ranges) {
my $lower = shift @ranges;
my $upper = shift @ranges;
push @sets, blessed($self)->new("$lower-$upper");
}
return @sets;
}
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
my $self = shift;
my $offset = shift;
my $length = shift;
my @edges = $self->edges;
my $slice = blessed($self)->new;
while ( @edges > 1 ) {
my ( $lower, $upper ) = @edges[ 0, 1 ];
my $span_size = $upper - $lower;
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
if ( $code_ref->() ) {
push @sub_elements, $_;
}
}
my $sub_set = blessed($self)->new(@sub_elements);
return $sub_set;
}
sub map_set {
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
push @map_elements, $element;
}
}
}
my $map_set = blessed($self)->new(@map_elements);
return $map_set;
}
sub substr_span {
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
}
sub cover {
my $self = shift;
my $cover = blessed($self)->new;
if ( $self->is_not_empty ) {
$cover->add_pair( $self->min, $self->max );
}
return $cover;
}
sub holes {
my $self = shift;
my $holes = blessed($self)->new;
if ( $self->is_empty or $self->is_universal ) {
# empty set and universal set have no holes
}
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
sub inset {
my $self = shift;
my $n = shift;
my $inset = blessed($self)->new;
my @ranges = $self->ranges;
while (@ranges) {
my $lower = shift @ranges;
my $upper = shift @ranges;
if ( $lower != $self->NEG_INF ) {
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
sub excise {
my $self = shift;
my $minlength = shift;
my $set = blessed($self)->new;
map { $set->merge($_) } grep { $_->size >= $minlength } $self->sets;
return $set;
}
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
sub _find_islands_int {
my $self = shift;
my $number = shift;
my $island = blessed($self)->new;
# if $pos & 1, i.e. $pos is odd number, $val is in the set
my $pos = $self->_find_pos( $number + 1, 0 );
if ( $pos & 1 ) {
my @ranges = $self->ranges;
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
sub _find_islands_set {
my $self = shift;
my $supplied = shift;
my $islands = blessed($self)->new;
if ( $self->overlap($supplied) ) {
for my $subset ( $self->sets ) {
$islands->merge($subset) if $subset->overlap($supplied);
}
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
my $supplied = shift;
if ( ref $supplied eq __PACKAGE__ ) { # just OK
}
elsif ( isint($supplied) ) {
$supplied = blessed($self)->new($supplied);
}
else {
confess "Don't know how to deal with input to nearest_island\n";
}
my $island = blessed($self)->new;
my $min_d;
for my $s ( $self->sets ) {
for my $ss ( $supplied->sets ) {
next if $s->overlap($ss);
my $d = $s->distance($ss);
lib/AlignDB/IntSpanXS.pm view on Meta::CPAN
if ( defined $supplied and ref $supplied eq __PACKAGE__ ) {
return $supplied;
}
else {
return blessed($self)->new($supplied);
}
}
# _find_pos
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AuthV2.pm view on Meta::CPAN
#é¿éäºAPIç¾å
sub new {
my $class = shift;
$class = (ref $class) || $class || __PACKAGE__;
my $self = bless {}, $class;
$self->{'aliyun_url'} = 'http://gw.api.taobao.com/router/rest';
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} =~ 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/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
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
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_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, (const MGVTBL * const)&vtbl_md5, (const char *)context, 0);
return obj;
}
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