view release on metacpan or search on metacpan
$self->{'steps'} ||= 250;
my $tapelen = 200;
$self->{'tape'} = [ (" ") x $tapelen ];
$self->{'tape_pos'} = int($tapelen / 2);
return bless($self, $class);
}
# Add an entry to the spec hash.
sub add_spec {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
{
package foo;
sub quux {}
}
my $i = bless {}, 'foo';
lives_ok {
ok $i->cannot('bar');
};
ok !$i->can('bar');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/UNIVERSAL/new.pm view on Meta::CPAN
sub UNIVERSAL::new
{
my $class = get_class();
my $ref = get_ref();
bless $ref, $class;
}
sub get_class
{
my ($root, $prefix) = @_;
lib/Acme/UNIVERSAL/new.pm view on Meta::CPAN
beneath the given C<$symbol_table> reference named C<$name_prefix>. If you
pass neither argument, this starts in the main symbol table.
=head2 C<get_ref()>
Returns a random blessable reference.
=head2 C<has_constructor( $class_name )>
Returns true if the given class has a constructor named C<new()> that is I<not>
C<UNIVERSAL::new()>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/UPnP.pm view on Meta::CPAN
}
}
}
ADJUST {
$http = HTTP::Tiny->new( agent => 'Acme-UPnP/1.0', timeout => 3 );
$upnp_device = bless {}, 'Acme::UPnP::Device'; # Dummy
}
method discover_device () {
# SSDP Search
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/URM.pm view on Meta::CPAN
}
sub new {
my $class = shift;
my $self = {@_};
$self = bless $self, $class;
$self->_init();
$self
}
sub _init {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Umlautify.pm view on Meta::CPAN
our %map = ( A => 196, E => 203, I => 207, O => 214, U => 220, a => 228,
e => 235, i => 239, o => 246, u => 252, y => 255 );
sub new {
bless({},$_[0]);
}
sub do {
my $self = shift @_;
return $self->umlautify(@_);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Undead.pm view on Meta::CPAN
die() #died;
=head1 DESCRIPTION
Acme::Undead is export routines, die(), bless() and sleep().
Use Acme::Undead when dont die at die(), die at bless() and not sleep at sleep().
=head1 OVERRIDE METHODS
=head2 die
lib/Acme/Undead.pm view on Meta::CPAN
=head2 sleep
undead is not sleeping
=head2 bless
the god bless clean undead auras.
=cut
our @EXPORT = qw/die sleep bless/;
our $IS_UNDEAD = 0;
sub import {
my $class = shift;
my $caller = shift;
lib/Acme/Undead.pm view on Meta::CPAN
sub _sleep {
my $hinthash = (caller(0))[10];
return $hinthash->{acme_undead} ? undef : sleep(shift);
}
sub _bless {
my $hinthash = (caller(0))[10];
return $hinthash->{acme_undead} ? die('blessed') : do {
my $arg = shift;
my $pkg = shift || (caller(0))[0];
bless($arg, $pkg);
}
}
sub END {
return unless $IS_UNDEAD;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Unicodify.pm view on Meta::CPAN
sub new {
my $class = shift;
my $self = {};
bless $self, $class;
$self->_define_cache();
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Urinal.pm view on Meta::CPAN
sub new {
my ($class, $resources) = @_;
if (ref $resources) {
return bless [ map { [ 0, $_ ] } @$resources ], $class;
}
elsif ($resources > 0) {
return bless [ map { [ 0, $_ ] } 0 .. ($resources - 1) ], $class;
}
else {
croak "incorrect argument";
}
}
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 212
sub call {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/VerySign.pm view on Meta::CPAN
####################################################################
# unique that array
my %orig = map { $_ => 1 } @orig;
my $this = bless [keys %orig], $class;
return $this;
}
sub as_string { "64.94.110.11" }
view all matches for this distribution
view release on metacpan or search on metacpan
no strict 'refs';
for(@void){
*{$pkg . "::$_"} = sub :lvalue {
lnoreturn
if want qw(LVALUE ASSIGN);
return my $self = bless sub {}, $class
if want qw(OBJECT LVALUE);
return;
};
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Voodoo.pm view on Meta::CPAN
if ( $instance =~ /HASH/ ) { $ref = {}; }
elsif ( $instance =~ /ARRAY/ ) { $ref = []; }
elsif ( $instance =~ /GLOB/ ) {
croak "glob objects are currently resistant to our voodoo spells!";
}
$doll = bless $ref, $dollClass;
## make our voodoo doll namespace inherit the AUTLOADER
## from the Acme::Voodoo namespace so we can trap method calls
push( @{ "${dollClass}::ISA" }, 'Acme::Voodoo' );
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
}
if ($conf{'list_file'} eq $conf{'hash_file'}) {
die "list_file and hash_file cannot point to the same file";
}
# Return our blessed object
return bless({ conf=>\%conf, data=>\%data}, __PACKAGE__);
}
# A destructor for the object, so that we get a chance to autosave the state
# if the caller so desired.
# Arguments: None.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/WalkMethods.pm view on Meta::CPAN
sub new {
my ($proto,$conf) = @_;
my $class = ref($proto) || $proto;
my $self = {};
bless($self, $class);
return $self;
}
sub AUTOLOAD {
my $name = $AUTOLOAD;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Want5000trillion.pm view on Meta::CPAN
sub new {
my ($class,%parameters) = @_;
my $self = bless ({},ref($class) || $class);
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Web20/Validator.pm view on Meta::CPAN
__PACKAGE__->mk_accessors(qw(ua is_validated ok_count));
sub new {
my $class = shift;
my $self = bless {}, $class;
$self->_init(@_);
$self;
}
sub _init {
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/Acme/YAPC/Okinawa/ppport.h view on Meta::CPAN
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/Acme/Yoda.pm view on Meta::CPAN
sub new {
my $class = shift;
my %args = @_;
$args{_link_parser} = $_link;
my $self = bless \%args, ref($class) || $class ;
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{base}/$args{prefix}/$args{path}.pm";
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
landmine.pm view on Meta::CPAN
eval <<EOF;
sub $AUTOLOAD {
my \$flavor = shift;
my \$sin = shift;
bless \\\$sin, \$flavor;
}
EOF
}else{
eval <<EOF;
sub $AUTOLOAD {
landmine.pm view on Meta::CPAN
we've got two functions, DESTROY, which is just there so
AUTOLOAD isn't called at DESTROY time, and AUTOLOAD, which
behaves differently if you are calling TIE-something or if
you are using your tied variable. at C<tie> time, the AUTOLOAD
function blesses the tie argument, if any, as a scalar reference,
so the argument is saved as the "sin" to "confess" (that is,
die with a stack-trace) when the
exploding variable is used any other way.
If you look at the source code of this module, which is very short,
view all matches for this distribution
view release on metacpan or search on metacpan
sub TIESCALAR{
shift; #Package
my %P = (please => $PLEASE, pctg => $PCTG, @_);
bless \%P;
};
sub FETCH{
rand(100) > $_[0]->{pctg} and return '';
$_[0]->{please}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/rafl/Everywhere.pm view on Meta::CPAN
q{rafl is so everywhere, the Da Vinci code is actually a Base64 Rot13 representation of rafl},
);
sub new {
my $class = shift;
my $self = bless {@_}, $class;
exists $self->{'facts'}
or $self->{'facts'} = \@default_facts;
return $self;
view all matches for this distribution
view release on metacpan or search on metacpan
package GagMe;
use strict;
sub TIEHANDLE {
my $class = shift;
bless(\( my $ref = ''), $class);
}
sub PRINT {
my $self = shift;
$$self .= join('', @_);
view all matches for this distribution
view release on metacpan or search on metacpan
sub new{
my($class) = shift;
my($self) = {};
bless($self,$class);
$rfield = Acpi::Field->new;
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acrux/DBI.pm view on Meta::CPAN
# Default attributes
my %_opts = (%{(DEFAULT_DBI_OPTS)}, %$opts);
my $autoclean = delete $_opts{autoclean};
my $self = bless {
url => $url,
uri => $uri,
dsn => '',
cachekey=> '',
driver => '',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Crux.pm view on Meta::CPAN
# Current dir
my $pwd = getcwd();
# Create
my $self = bless {
# Common
error => "",
script => $Script,
invocant => scalar(caller(0)),
project => $project,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Action/CircuitBreaker.pm view on Meta::CPAN
package Action::CircuitBreaker;
$Action::CircuitBreaker::VERSION = '0.1';
# ABSTRACT: Module to try to perform an action, with an option to suspend execution after a number of failures.
use Scalar::Util qw(blessed);
use Time::HiRes qw(gettimeofday);
use Carp;
use base 'Exporter';
our @EXPORT = ((caller())[1] eq '-e' ? @EXPORT_OK : ());
view all matches for this distribution