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


Math-Random-Cauchy

 view release on metacpan or  search on metacpan

lib/Math/Random/Cauchy.pm  view on Meta::CPAN

        middle => $args{middle},
        random => $args{random},
        cache => [],
    };

    bless $self => $class;

    return $self;
}

=head2 rand

 view all matches for this distribution


Math-Sequence

 view release on metacpan or  search on metacpan

lib/Math/Sequence.pm  view on Meta::CPAN

        formula       => $parsed,
        current       => 0,
        current_value => $start,
        cache         => [$start],
    };
    return bless $self => $class;
}

=item next()

The next() method returns the next element of the sequence and advances the

 view all matches for this distribution


Math-Series

 view release on metacpan or  search on metacpan

lib/Math/Series.pm  view on Meta::CPAN

        current_value => $start,
        cache         => [$start],
        iter_var      => $iter_var,
        start_index   => $start_index,
    };
    return bless $self => $class;
}

=item next()

The next() method returns the next element of the series and advances the

 view all matches for this distribution


Math-SimpleHisto-XS

 view release on metacpan or  search on metacpan

lib/Math/SimpleHisto/XS/Named.pm  view on Meta::CPAN


  my $struct = $Math::SimpleHisto::XS::JSON->decode($data);
  $class = delete $struct->{class};
  my $hclass = delete $struct->{histclass};
  $struct->{hist} = $hclass->new_from_dump($type, delete $struct->{hist});
  return bless($struct => $class);
}

# Can't simply be delegated, eventhough the implementation is the same :(
sub STORABLE_freeze {
  my $self = shift;

 view all matches for this distribution


Math-Symbolic-Custom-Pattern

 view release on metacpan or  search on metacpan

lib/Math/Symbolic/Custom/Pattern.pm  view on Meta::CPAN

    pattern => $pattern,
    info    => $info,
    string  => $proto->to_string(),
  };

  return bless $self => $class;
}


sub _descend_build {
  my ($proto, $info) = @_;

 view all matches for this distribution



Math-Symbolic

 view release on metacpan or  search on metacpan

lib/Math/Symbolic/Constant.pm  view on Meta::CPAN

        ( ref($proto) ? %$proto : () ),
        value => $value,
        %args,
    };

    bless $self => $class;
}

=head2 Constructor zero

Arguments are treated as key-value pairs of object attributes.

 view all matches for this distribution


Math-SymbolicX-Calculator-Interface-Shell

 view release on metacpan or  search on metacpan

lib/Math/SymbolicX/Calculator/Interface/Shell.pm  view on Meta::CPAN

        input_handle     => $args{input_handle} || \*STDIN,
        prompt           => _dor($args{prompt}, '~> '),
        continued_prompt => _dor($args{continued_prompt}, '>> '),
        app_name         => _dor($args{app_name}, 'Symbolic Calculator Shell'),
    };
    bless $self => $class;

    $self->_setup_readline();

    return $self;
}

 view all matches for this distribution


Math-SymbolicX-Calculator-Interface-Web

 view release on metacpan or  search on metacpan

lib/Math/SymbolicX/Calculator/Interface/Web.pm  view on Meta::CPAN


    my $self = {
        calc             => $args{calculator}
                            || Math::SymbolicX::Calculator->new(),
    };
    bless $self => $class;

    return $self;
}

=head2 execute_expression

 view all matches for this distribution



Math-Taylor

 view release on metacpan or  search on metacpan

lib/Math/Taylor.pm  view on Meta::CPAN

        $self->{point} = $proto->{point} if defined $proto->{point};
        $self->{remainder_type} = $proto->{remainder_type}
          if defined $proto->{remainder_type};
    }

    bless $self => $class;

    $self->function( $args{function} ) if exists $args{function};
    $self->variable( $args{variable} ) if exists $args{variable};
    $self->point( $args{point} )       if exists $args{point};

 view all matches for this distribution


Metabase-Client-Simple

 view release on metacpan or  search on metacpan

lib/Metabase/Client/Simple.pm  view on Meta::CPAN

    my $args = $class->__validate_args( \@args, { map { $_ => 1 } @valid_args } );

    # uri must have a trailing slash
    $args->{uri} .= "/" unless substr( $args->{uri}, -1 ) eq '/';

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

    unless ( $self->profile->isa('Metabase::User::Profile') ) {
        Carp::confess("'profile' argument for $class must be a Metabase::User::Profile");
    }
    unless ( $self->secret->isa('Metabase::User::Secret') ) {

 view all matches for this distribution


Metabase-Web

 view release on metacpan or  search on metacpan

lib/Metabase/Web/Model/Metabase.pm  view on Meta::CPAN

sub COMPONENT {
  my ($class, $c, $user_config) = @_;

  my $config = Catalyst::Utils::merge_hashes($default_config, $user_config);

  my $self = bless {} => $class;
  
  my $fact_classes = $config->{fact_classes};
  Carp::croak "no fact_classes supplied to $class configuration"
    unless $fact_classes and @$fact_classes;

 view all matches for this distribution


Method-Delegation

 view release on metacpan or  search on metacpan

t/delegate.t  view on Meta::CPAN


    package Second;

    sub new {
        my $class = shift;
        return bless {} => $class;
    }

    sub name { return __PACKAGE__ }
}

 view all matches for this distribution


Mixin-ExtraFields-Driver-DBIC

 view release on metacpan or  search on metacpan

lib/Mixin/ExtraFields/Driver/DBIC.pm  view on Meta::CPAN

    id_column    => $arg->{id_column}    || 'object_id',
    name_column  => $arg->{name_column}  || 'extra_name',
    value_column => $arg->{value_column} || 'extra_value',
  };

  bless $self => $class;
}

sub id_column       { $_[0]->{id_column}    }
sub name_column     { $_[0]->{name_column}  }
sub value_column    { $_[0]->{value_column} }

 view all matches for this distribution


Mixin-ExtraFields

 view release on metacpan or  search on metacpan

lib/Mixin/ExtraFields/Driver/HashGuts.pm  view on Meta::CPAN

}

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

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

  $self->{hash_key} = $arg->{hash_key} || $self->default_hash_key;

  return $self;
}

 view all matches for this distribution


Mixin-Historian

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN

    }
  };

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

  sub id { $_[0]{id} }
}

 view all matches for this distribution


Module-Build

 view release on metacpan or  search on metacpan

t/bundled/Software/License.pm  view on Meta::CPAN

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

  # XXX changed from Carp::croak to die
  die "no copyright holder specified" unless $arg->{holder};

  bless $arg => $class;
}


sub year   { defined $_[0]->{year} ? $_[0]->{year} : (localtime)[5]+1900 }
sub holder { $_[0]->{holder} }

 view all matches for this distribution


Module-Generic

 view release on metacpan or  search on metacpan

lib/Module/Generic.pm  view on Meta::CPAN

        'verbose' => ${ "${class}\::VERBOSE" },
        'error' => ${ "${class}\::ERROR" },
        };
        ## XXX 
        ## print( STDERR "Called with '$self' with debug value '$hash->{debug}' and verbose '$hash->{verbose}'\n" );
        return( bless( $hash => $class ) );
    }
    ## Because object may be accessed as My::Package->method or My::Package::method
    ## there is not always an object available, so we need to fake it to avoid error
    ## This is primarly itended for generic methods error(), errstr() to work under any conditions.
    else

 view all matches for this distribution


Module-Starter-Plugin-CGIApp

 view release on metacpan or  search on metacpan

lib/Module/Starter/Plugin/CGIApp.pm  view on Meta::CPAN

    my $class = ref $proto || $proto;

    my $self = $class->SUPER::new(%opts);
    $self->{templates} = { $self->templates };

    return bless $self => $class;
}

=head2 create_distro ( %args ) 

This method works as advertised in L<Module::Starter|Module::Starter>.

 view all matches for this distribution


Module-Starter

 view release on metacpan or  search on metacpan

lib/Module/Starter/Plugin/Template.pm  view on Meta::CPAN

sub new {
    my $class = shift;
    my $self  = $class->SUPER::new(@_);
    $self->{templates} = { $self->templates };
    $self->{renderer} = $self->renderer;
    return bless $self => $class;
}

=head1 OBJECT METHODS

=head2 C<< templates() >>

 view all matches for this distribution


Mojar-Cron

 view release on metacpan or  search on metacpan

lib/Mojar/Cron/Date.pm  view on Meta::CPAN


sub new {
  my $proto = shift;
  my $class = ref $proto || $proto;
  my $payload = @_ ? shift : ref $proto ? $$proto : $class->today;
  bless \$payload => $class;
}

sub today {
  my ($d, $m , $y) = (localtime)[3, 4, 5];
  return shift->new(sprintf '%04u-%02u-%02u', $y + 1900, $m + 1, $d);

 view all matches for this distribution


Mojo-Run

 view release on metacpan or  search on metacpan

lib/Mojo/Run.pm  view on Meta::CPAN

sub _constructor {
	my $proto = shift;
	my $class = ref($proto) || $proto;
	my $self  = $class->SUPER::new;

	bless $self => $class;
	
	# install SIGCHLD handler
	$SIG{'CHLD'} = sub { _sig_chld($self, @_) };
	
	return $self;

 view all matches for this distribution


Mojo-Webqq

 view release on metacpan or  search on metacpan

lib/Mojo/Webqq/Run.pm  view on Meta::CPAN

sub _constructor {
        my $proto = shift;
        my $class = ref($proto) || $proto;
        my $self  = $class->SUPER::new(@_);
 
        bless $self => $class;
         
        # install SIGCHLD handler
        $SIG{'CHLD'} = sub { _sig_chld($self, @_) };
         
        return $self;

 view all matches for this distribution


Mojo-Weixin

 view release on metacpan or  search on metacpan

lib/Mojo/Weixin/Run.pm  view on Meta::CPAN

sub _constructor {
        my $proto = shift;
        my $class = ref($proto) || $proto;
        my $self  = $class->SUPER::new(@_);
 
        bless $self => $class;
         
        # install SIGCHLD handler
        $SIG{'CHLD'} = sub { _sig_chld($self, @_) };
         
        return $self;

 view all matches for this distribution


Mojolicious-Plugin-StaticShare

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/StaticShare.pm  view on Meta::CPAN

    #~ if $pkg->can('import');
  return $pkg->new()
    if $pkg->can('new') && $pkg->can('parse');
  return
    unless $pkg->can('markdown');
  bless {pkg=>$pkg} => $class;
}

sub parse { my $self = shift; no strict 'refs'; ($self->{pkg}.'::markdown')->(@_); }


 view all matches for this distribution


Mojolicious-Plugin-Vparam

 view release on metacpan or  search on metacpan

lib/Mojolicious/Plugin/Vparam/Address.pm  view on Meta::CPAN

use Encode                          qw(encode is_utf8);


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

=head2 parse $str

Parse address from string

 view all matches for this distribution


Mongoose

 view release on metacpan or  search on metacpan

lib/Mongoose/Engine.pm  view on Meta::CPAN

            }
        }
        else { #non-moose
            my $data = delete $doc->{$name};
            if ( my $data_class = ref $data ) {
                $doc->{$name} = $data_class eq 'boolean' ? $data : bless $data => $class;
            }
            else {
                push @later, { attrib => $name, value => $data };
            }
        }
    }

    return undef unless defined $doc;
    bless $doc => $class_main;
    for ( @later )  {
        my $attr = $class_main->meta->get_attribute($_->{attrib});
        if( defined $attr ) {
            # works for read-only values
            $attr->set_value($doc, $_->{value});

 view all matches for this distribution


Moo

 view release on metacpan or  search on metacpan

lib/Moo/Object.pm  view on Meta::CPAN


# duplicated in Moo::Role
sub meta {
  require Moo::HandleMoose::FakeMetaClass;
  my $class = ref($_[0])||$_[0];
  bless({ name => $class }, 'Moo::HandleMoose::FakeMetaClass');
}

1;

 view all matches for this distribution


MooX-Cmd

 view release on metacpan or  search on metacpan

lib/MooX/Cmd/Tester.pm  view on Meta::CPAN

      MooX::Cmd::Tester::Result;

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

my $res = Package::Stash->new("MooX::Cmd::Tester::Result");
for my $attr (qw(app cmd stdout stderr output error execute_rv exit_code))

 view all matches for this distribution


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