Result:
found 516 distributions and 950 files matching your query ! ( run in 1.442 )


CPAN-Uploader

 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;
}

#pod =method read_config_file
#pod
#pod   my $config = CPAN::Uploader->read_config_file( $filename );

 view all matches for this distribution


CWB-CQP-More

 view release on metacpan or  search on metacpan

lib/CWB/CQP/More/Iterator.pm  view on Meta::CPAN

    $self->{size}  = $ops{size}       || 1;

    $self->{fname} = $self->{crp}?"$self->{crp}:$self->{name}" : $self->{name};
    $self->{limit} = $cwb->size($self->{fname}) || 0;

    return bless $self => $class;
}

sub reset {
    my $self = shift;
    $self->{pos} = 0;

 view all matches for this distribution


Catalyst-Plugin-C3

 view release on metacpan or  search on metacpan

t/10basics.t  view on Meta::CPAN

}

package C3NT::Foo;
use base qw/ Catalyst::Component /;

sub new { my $class = shift; my %args = (@_); bless \%args => $class }
sub basic { return 42 }
sub c3_then_next { return 21 }
sub next_then_c3 { return 22 }

package C3NT::Bar;

 view all matches for this distribution


CayleyDickson

 view release on metacpan or  search on metacpan

lib/CayleyDickson.pm  view on Meta::CPAN

   }
   else {
      @pair = ( $values[0] ,
	        $values[1] )
   }
   bless [ $class->prepare(@pair) ] => $class;
}



#

 view all matches for this distribution


Chess-960

 view release on metacpan or  search on metacpan

lib/Chess/960.pm  view on Meta::CPAN

#
# =cut

sub new {
  my ($class) = @_;
  bless {} => $class;
}

# =method generate_position
#
#   my $pos = $c960->generate_position($num);

 view all matches for this distribution


Chess-PGN-Extract

 view release on metacpan or  search on metacpan

lib/Chess/PGN/Extract/Stream.pm  view on Meta::CPAN

  $self->{pgn_file} = $pgn_file;
  open my $pgn_handle, '<', $pgn_file
    or croak ("Cannot open PGN file: \"$pgn_file\"");
  $self->{pgn_handle} = $pgn_handle;

  bless $self => $class;
}

sub pgn_file { $_[0]->{pgn_file} }

sub read_game {

 view all matches for this distribution


Class-Accessor-Class

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN

package Robot;
	@Robot::ISA = qw(Class::Accessor::Class);
	Robot->mk_class_accessors(qw(robots_online));
	Robot->robots_online(1);

	sub new { my $class = shift; bless {@_} => $class }
	sub do_something {
		my $self = shift;
		return $self->robots_online ? 1 : 0;
	}
package main;

 view all matches for this distribution


Class-Accessor-TrackDirty

 view release on metacpan or  search on metacpan

t/CasualEntity.pm  view on Meta::CPAN


sub new {
    my $class = shift;

    # I don't need any checks :)
    bless {@_ == 1 ? %{$_[0]} : @_} => $class;
}

1;

 view all matches for this distribution


Class-C3

 view release on metacpan or  search on metacpan

t/23_multi_init.t  view on Meta::CPAN

    BEGIN { our @ISA = ('TestMRO::C'); }
    use Class::C3;
    sub new {
        my $class = shift;
        my $self = {};
        bless $self => $class;
    }
}

Class::C3::initialize;
is(TestMRO::D->new->testmethod, 43, 'double-initialize works ok');

 view all matches for this distribution


Class-DBI

 view release on metacpan or  search on metacpan

lib/Class/DBI/Cascade/None.pm  view on Meta::CPAN

use strict;
use warnings;

sub new {
	my ($class, $rel) = @_;
	bless { _rel => $rel } => $class;
}

sub foreign_for {
	my ($self, $obj) = @_;
	return $self->{_rel}

 view all matches for this distribution


Class-Declare

 view release on metacpan or  search on metacpan

Declare.pm  view on Meta::CPAN

  my    $ref                  = \%hash;
  my  ( $key )                =  ( $ref =~ m#0x([a-f\d]+)#o );
        $__OBJECTS__{ $key }  = $ref;

  # create the new object (applying the index offset)
  my  $obj   = bless \$key => $class;

  # if there were any arguments passed, then these will be used to
  # set the parameters for this object
  # NB: - only public attributes may be set this way
  #     - need to examine every class in the @ISA hierarchy

 view all matches for this distribution


Class-Hook

 view release on metacpan or  search on metacpan

t/lib/FOO.pm  view on Meta::CPAN

	my $class = shift;
	my $param = shift;
#	print "new called with ".Dumper(\@_) . "from ".caller(0)."\n";
	$self = { key1 => 'Hello there',
              key2 => $param };
	return bless $self => $class;
}

sub bar {
#	print "bar called with ".Dumper(\@_) . "from ".caller(0)."\n";
	my $self = shift;

 view all matches for this distribution


Class-Lite

 view release on metacpan or  search on metacpan

lib/Class/Lite.pm  view on Meta::CPAN

#   Passes any arguments to init().
#   
sub new {
    my $class   = shift;
    my $self    = {};
    bless ( $self => $class );
    $self->init(@_);
    return $self;
}; ## new

#=========# OBJECT METHOD

 view all matches for this distribution


Class-Maker

 view release on metacpan or  search on metacpan

lib/Class/Maker.pm  view on Meta::CPAN

	
	sub reflect
	{
		my $class = ref( $_[0] ) || $_[0] || die;
	
			my $rfx = bless {  name => $class  }, 'Class::Maker::Reflex';
	
				# - First get the "${$DEFINITION}" href containing the class definition
				# - find the functions of that class declerated with ': method'
				# - catch up the parent class reflection if DEEP is activated
				# - update "${$DEFINITION}"->{isa} with its real @ISA

 view all matches for this distribution


Class-Persist

 view release on metacpan or  search on metacpan

lib/Class/Persist/Proxy.pm  view on Meta::CPAN

    }
    return $self->record('Class::Persist::Error::DB::NotFound', "Could not load $class for $self", 1)
  }

  $self->_duplicate_from( $obj );
  bless $self => $class;
}


=head2 proxy( $obj )

 view all matches for this distribution


Class-XSAccessor

 view release on metacpan or  search on metacpan

XS/Array.xs  view on Meta::CPAN


    classname = SvROK(class) ? sv_reftype(SvRV(class), 1) : SvPV_nolen_const(class);
    array = newAV();
    obj = sv_bless( newRV_noinc((SV*)array), gv_stashpv(classname, 1) );
    /* we ignore arguments. See Class::XSAccessor's XS code for
     * how we'd use them in case of bless {@_} => $class.
     */
    PUSHs(sv_2mortal(obj));

void
newxs_getter(namesv, index)

 view all matches for this distribution


Collection-Categorized

 view release on metacpan or  search on metacpan

lib/Collection/Categorized.pm  view on Meta::CPAN

    my $action = $dispatch->{ref $ref};
    croak 'pass an ARRAY or CODE reference only' unless $action;
    $action->();
    
    $self->{_data} = {};
    return bless $self => $class;
}

=head2 categories

Returns a list of categories in use

 view all matches for this distribution


Color-Rgb

 view release on metacpan or  search on metacpan

Rgb.pm  view on Meta::CPAN

        $self->{_rgb_map}->{ lc($name) } = [$r, $g, $b];
    }

    close (RGB) or croak "$self->{rgb_txt}: $!";

    return bless $self => $class;
}




 view all matches for this distribution


Conan

 view release on metacpan or  search on metacpan

lib/Conan/Configure/Xen.pm  view on Meta::CPAN

				$self->{settings}->{postboot},
				$self->{settings}->{name} || $self->{name};
		};
	}

	bless $args => $class;
}

sub generate {

	my $self = shift;

 view all matches for this distribution


Config-FromHash

 view release on metacpan or  search on metacpan

lib/Config/FromHash.pm  view on Meta::CPAN

    }
    else {
        $args{'environments'} = [ undef ];
    }

    my $self = bless \%args => $class;

    Hash::Merge::set_behavior('LEFT_PRECEDENT');

    if(scalar @{ $args{'filenames'} }) {

 view all matches for this distribution


Config-INI

 view release on metacpan or  search on metacpan

lib/Config/INI/Reader.pm  view on Meta::CPAN

sub new {
  my ($class) = @_;

  my $self = { data => {}, };

  bless $self => $class;
}

#pod =head1 ORIGIN
#pod
#pod Originaly derived from L<Config::Tiny>, by Adam Kennedy.

 view all matches for this distribution


Config-ReadAndCheck

 view release on metacpan or  search on metacpan

ReadAndCheck.pm  view on Meta::CPAN

	$self->{'Params'} = &{$CheckParams}($Config{'Params'})
		or return;

	Reset($self);

	return bless $self => $class;
	};

sub Result($)
	{
	my ($self) = @_;

 view all matches for this distribution


Config-Singleton

 view release on metacpan or  search on metacpan

lib/Config/Singleton.pm  view on Meta::CPAN

  my ($app_config, $arg) = @_;

  sub {
    my ($class, $filename) = @_;

    my $self = bless { } => $class;

    $self->{basename} = $filename || $class->default_filename;

    $filename = $app_config->_find_file_in_path(
      $self->{basename},

 view all matches for this distribution


Copy-From-Git

 view release on metacpan or  search on metacpan

lib/Copy/From/Git.pm  view on Meta::CPAN

		subdir => '.',
		user   => getlogin(),
		@_,
	};

	return bless $args => $class;
}

sub clone {
	my ($self, $target) = @_;

 view all matches for this distribution


Crypt-CAST5_PP

 view release on metacpan or  search on metacpan

CAST5_PP.pm  view on Meta::CPAN

$VERSION = "1.04";

sub new {
  my ($class, $key) = @_;
  my $cast5 = { };
  bless $cast5 => $class;
  $cast5->init($key) if defined $key;
  return $cast5;
} # new

sub blocksize { return 8  }

 view all matches for this distribution


DB-Color

 view release on metacpan or  search on metacpan

lib/DB/Color/Highlight.pm  view on Meta::CPAN

    *Syntax::Highlight::Engine::Kate::Template::logwarning = sub { };
}

sub new {
    my ( $class, $args ) = @_;
    my $self = bless {} => $class;
    $self->_initialize($args);
    return $self;
}

sub _initialize {

 view all matches for this distribution


DBI

 view release on metacpan or  search on metacpan

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


DBIx-Class-Loader

 view release on metacpan or  search on metacpan

t/dbixcl_common_tests.pm  view on Meta::CPAN

    # Only MySQL uses this
    $self->{innodb} ||= '';

    $self->{verbose} = $ENV{TEST_VERBOSE} || 0;

    return bless $self => $class;
}

sub skip_tests {
    my ($self, $why) = @_;

 view all matches for this distribution


DBIx-Class

 view release on metacpan or  search on metacpan

lib/DBIx/Class/Exception.pm  view on Meta::CPAN

    else {
        $msg = Carp::longmess($msg);
    }

    my $self = { msg => $msg };
    bless $self => $class;

    die $self;
}

=head2 rethrow

 view all matches for this distribution


( run in 1.442 second using v1.00-cache-1.14-grep-28634ff-cpan-4d46879620f )