view release on metacpan or search on metacpan
lib/Pandoc/Metadata.pm view on Meta::CPAN
# package Pandoc::Metadata::Error;
# use overload q[""] => 'shortmess', q[%{}] => 'data', fallback => 1;
# use constant { SHORTMESS => 0, LONGMESS => 1, DATA => 2 };
# sub new {
# my($class, @values) = @_; # CLASS, (MESSAGE, {DATA})
# bless \@values => $class;
# }
# sub shortmess { shift->[SHORTMESS] }
# sub longmess { shift->[LONGMESS] }
# sub data { shift->[DATA] }
# sub rethrow { die shift }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pandoc/Version.pm view on Meta::CPAN
map { 'ARRAY' CORE::eq ( reftype $_ // "" ) ? @$_ : $_ }
map { $_ // '' } @_;
Pandoc::Error->throw('invalid version number') unless @nums;
return bless \@nums => $class;
}
sub string { join '.', @{ $_[0] } }
sub number {
view all matches for this distribution
view release on metacpan or search on metacpan
t/pp/06_invocant.t view on Meta::CPAN
package Params::Util::Test::_INVOCANT::Tied;
sub TIESCALAR
{
my ($class, $value) = @_;
return bless \$value => $class;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Parse/IRCLog/Result.pm view on Meta::CPAN
my $class = shift;
my @events = @_;
return if ref $class;
return unless @events;
bless { events => \@events } => $class;
}
# =method events
#
# This method returns the list of events in the result set.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Path/Hilbert.pm view on Meta::CPAN
# optional constructor if you want OO-style
sub new {
my $class = shift;
my ($n) = @_;
return bless { n => $n } => $class;
}
# convert (x,y) to d
sub _xy2d {
my ($side, $x, $y) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl/APIReference.pm view on Meta::CPAN
# only for ::Generator
sub _new_from_parse {
my $class = shift;
return bless {@_} => $class;
}
# only for ::Generator
sub _dump_as_class {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl/Critic/Policy/Tics/ProhibitLongLines.pm view on Meta::CPAN
Carp::croak "pct_allowed for Tics::ProhibitLongLines must be a positive int"
unless $merge{pct_allowed} =~ /\A\d+\z/ and $merge{pct_allowed} >= 0;
$self->{$_} = $merge{$_} for $self->supported_parameters;
bless $self => $class;
}
sub violates {
my ($self, $elem, $doc) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
* 20060: Incorrect page numbers in ProhibitLeadingZeros
and RequireNumberSeparator policies.
* 20068: .perlrc file - inconsistent documentation
* 20254: "use vars qw(@EXPORT_OK)" not recognized
* 20463: No-case heredoc terminator incorrectly detected as lower case.
* ProhibitOneArgBless doesn't understand "bless {} => $class;"
* ProhibitExcessComplexity doesn't count 'while' and 'until' stmnts
* ProhibitLeadingZeros was falsely hits '.0456'
[Enhancements]
* If File::HomeDir is available, we use it to locate the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl/Repository/APC.pm view on Meta::CPAN
my $self;
$self->{DIR} = $dir;
$self->{APC} = [_apc_struct($dir)];
bless $self => $class;
}
sub apcdirs {
my($self) = @_;
@{$self->{APC}};
view all matches for this distribution
view release on metacpan or search on metacpan
perl5/PIL2JS/lib/PIL/P5Macro.pm view on Meta::CPAN
use strict;
sub new {
my ($class, $name, $body) = @_;
return bless { body => $body, name => $name } => $class;
}
# XXX! TOTAL HACK!!!
# This is needed because perl5 seems to leak memory in the if-case below.
my $CORRECT_BEHAVIOUR = $ENV{PIL2JS_MACROS_CORRECT_BEHAVIOUR};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl7/Handy.pm view on Meta::CPAN
#---------------------------------------------------------------------
# TIESCALAR to disable $; (internal use to "no multidimensional")
sub TIESCALAR {
my $class = shift;
my $dummy;
return bless \$dummy => $class;
}
#---------------------------------------------------------------------
# FETCH to disable $; (internal use to "no multidimensional")
sub FETCH {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PerlIO/via/Bzip2.pm view on Meta::CPAN
or return -1;
}
else {
return -1;
}
return bless $self => $class;
}
sub FILL {
my ($self, $fh) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PerlIO/via/xz.pm view on Meta::CPAN
fh => undef,
level => 9, # Not yet settable
bsz => 4096, # Not yet settable
xz => undef,
};
return bless $self => $class;
} # PUSHED
sub FILENO {
my ($self, $fh) = @_;
#DDumper { FILENO => \@_ };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perlito5X/Tie/Scalar.pm view on Meta::CPAN
@ISA = qw(Tie::Scalar);
sub TIESCALAR {
my $class = shift;
my $instance = @_ ? shift : undef;
return bless \$instance => $class;
}
sub FETCH {
return ${$_[0]};
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pg/Priv.pm view on Meta::CPAN
return wantarray ? @privs : \@privs;
}
sub new {
my $class = shift;
my $self = bless { @_ } => $class;
$self->{parsed} = { map { $_ => 1 } split //, $self->{privs} || '' };
return $self;
}
sub to { shift->{to} }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Physics/Lorentz/Transformation.pm view on Meta::CPAN
}
$self->{vector} = $vec;
}
return bless($self => $class);
}
=head2 rotation_euler
Alternative constructor to construct a specific type of Lorentz transformation:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Physics/Particles.pm view on Meta::CPAN
n => '',
},
@_
};
bless $self => $class;
}
# method set_particle_default
#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pithub/ResultSet.pm view on Meta::CPAN
_current_index => 0,
_length => 0,
_iteratee => [],
_iterated => 0,
};
bless $iterator => $class;
$iterator->_init( scalar @{$_array}, $_array );
return $iterator;
}
sub _init {
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/App/Cmd/Command.pm view on Meta::CPAN
#pod
#pod =cut
sub new {
my ($class, $arg) = @_;
bless $arg => $class;
}
#pod =method execute
#pod
#pod $command_plugin->execute(\%opt, \@args);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Plack/Session/State.pm view on Meta::CPAN
$params{'sid_generator'} ||= sub {
Digest::SHA::sha1_hex(rand() . $$ . {} . time)
};
$params{'sid_validator'} ||= qr/\A[0-9a-f]{40}\Z/;
bless { %params } => $class;
}
sub expire_session_id {
my ($self, $id, $res) = @_;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Plack/Session/Store/KyotoTycoon.pm view on Meta::CPAN
sub new {
my ($class, %params) = @_;
$params{tycoon} = _verify_tycoon_connection;
return bless {%params} => $class;
}
sub fetch {
my ($self, $key) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Plack/Session/Store/RedisFast.pm view on Meta::CPAN
_build_encoder( ( delete $param{inflate} ), ( delete $param{deflate} ) );
$param{encoder} = $param{encoder}->new()
unless ref( $param{encoder} );
bless {%param} => $class;
}
sub _build_redis {
my $instance;
eval {
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/DBI.pm view on Meta::CPAN
sub _rebless {
my $dbh = shift;
my ($outer, $inner) = DBI::_handles($dbh);
my $class = shift(@_).'::db';
bless $inner => $class;
bless $outer => $class; # outer last for return
}
sub _set_isa {
my ($classes, $topclass) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pod/Eventual/Simple.pm view on Meta::CPAN
#pod
#pod =cut
sub new {
my ($class) = @_;
bless [] => $class;
}
sub read_handle {
my ($self, $handle, $arg) = @_;
$self = $self->new unless ref $self;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pod/From/GoogleWiki.pm view on Meta::CPAN
schemas => [ qw( http https ftp mailto gopher ) ],
};
}
return bless $self => $class;
}
sub wiki2pod {
my ($self, $text) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Proc/Daemontools/Service.pm view on Meta::CPAN
=cut
sub new {
my $class = shift;
die "no arguments to new" if @_;
return bless {} => $class;
}
=head2 C<< run >>
Install signal handlers and call C<< svc_run >>, which
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Promise/Me.pm view on Meta::CPAN
}
$new = $self;
}
else
{
$new = CORE::bless( $hash => $class );
}
CORE::return( $new );
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Promises/Promise.pm view on Meta::CPAN
sub new {
my ( $class, $deferred ) = @_;
( blessed $deferred && $deferred->isa('Promises::Deferred') )
|| confess "You must supply an instance of Promises::Deferred";
bless { 'deferred' => $deferred } => $class;
}
sub then { (shift)->{'deferred'}->then(@_) }
sub chain { (shift)->{'deferred'}->chain(@_) }
sub catch { (shift)->{'deferred'}->catch(@_) }
view all matches for this distribution
view release on metacpan or search on metacpan
RADIUS/XMLParser.pm view on Meta::CPAN
#Get orphan files
$startDbm = File::Spec->catfile( $orphanDir, "orphan.start" );
$interimDbm = File::Spec->catfile( $orphanDir, "orphan.interim" );
my $self = {};
bless $self => $class;
#Load orphan start and interim hash (if any)
_loadHash();
$self;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/RDF/Query/Plan.pm view on Meta::CPAN
=cut
sub new {
my $class = shift;
my @args = @_;
return bless( [ { __state => $class->READY }, @args ], $class );
}
=item C<< execute ( $execution_context ) >>
=cut
view all matches for this distribution