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


Arango-DB

 view release on metacpan or  search on metacpan

lib/Arango/DB/Collection.pm  view on Meta::CPAN

use warnings;
use strict;

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

sub create_document {
    my ($self, $body) = @_;
    die "Arango::DB | Refusing to store undefined body" unless defined($body);

 view all matches for this distribution


Arango-Tango

 view release on metacpan or  search on metacpan

lib/Arango/Tango/Collection.pm  view on Meta::CPAN




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

sub document_paths {
    my ($self) = @_;
    return $self->{arango}->_api( all_keys => { database => $self->{database}, collection => $self->{name}, type => "path"})->{result}

 view all matches for this distribution


Archive-Merged

 view release on metacpan or  search on metacpan

lib/Archive/Dir.pm  view on Meta::CPAN

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

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

 view all matches for this distribution


Archive-Rar

 view release on metacpan or  search on metacpan

lib/Archive/Rar/Passthrough.pm  view on Meta::CPAN

    stderr => '',
    ( ref($proto) ? %$proto : () ),
  };
  $self->{rar} = $args{rar} if exists $args{rar}; 

  bless $self => $class;
  return() if not $self->{rar} = $self->_findbin();
  
  return $self;
}

 view all matches for this distribution


Archive-SevenZip

 view release on metacpan or  search on metacpan

lib/Archive/SevenZip.pm  view on Meta::CPAN

    for( keys %class_defaults ) {
        $options{ $_ } = $class_defaults{ $_ }
            unless defined $options{ $_ };
    };

    bless \%options => $class
}

sub version {
    my( $self_or_class, %options) = @_;
    for( keys %class_defaults ) {

 view all matches for this distribution


Array-AsHash

 view release on metacpan or  search on metacpan

lib/Array/AsHash.pm  view on Meta::CPAN

    return $class->_initialize(@_);
}

sub _initialize {
    my ( $class, $arg_ref ) = @_;
    my $self = bless {} => $class;
    $self->{array_for} = [];
    return $self unless $arg_ref;
    my $array = $arg_ref->{array} || [];
    $self->{is_strict} = $arg_ref->{strict};
    $array = Clone::clone($array) if $arg_ref->{clone};

 view all matches for this distribution


Array-Heap-ModifiablePriorityQueue

 view release on metacpan or  search on metacpan

lib/Array/Heap/ModifiablePriorityQueue.pm  view on Meta::CPAN


=cut

sub new {
   my ($class) = @_;
   return bless { heap => [], items => {} } => $class;
}

=item $pq->add($item, $weight)

Add an item to the priority queue with the given weight. If the item is

 view all matches for this distribution


Asterisk-LCR

 view release on metacpan or  search on metacpan

bin/asterisk-lcr-myroutes  view on Meta::CPAN



sub new
{
    my $class = shift;
    my $self  = bless { @_ } => $class;
    my $file  = $self->{file};
    
    open FP, "<$file" or die "Cannot read open $file";
    $self->{lines} = [ map { chomp(); $_ } <FP> ];
    close FP;

 view all matches for this distribution


Attribute-Overload

 view release on metacpan or  search on metacpan

t/01_all.t  view on Meta::CPAN


package MyOverload;

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

sub add : Overload(+) {
    my ($self, $value) = @_;
    $$self += 2 * $value;

 view all matches for this distribution


Auth-GoogleAuthenticator

 view release on metacpan or  search on metacpan

lib/Auth/GoogleAuthenticator.pm  view on Meta::CPAN

    if( $args{ secret_base32 }) {
        $args{ secret } = decode_base32( delete $args{ secret_base32 });
    };
    
    $args{ auth } ||= Authen::OATH->new();
    bless \%args => $class;
}

sub auth { $_[0]->{auth} };

sub registration_qr_code {

 view all matches for this distribution


BSON-XS

 view release on metacpan or  search on metacpan

t/lib/TestTie.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


BSON

 view release on metacpan or  search on metacpan

t/lib/TestTie.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


Backblaze-B2

 view release on metacpan or  search on metacpan

lib/Backblaze/B2.pm  view on Meta::CPAN

    } else {
        $options{ bucket_class } ||= 'Backblaze::B2::v1::Bucket::Synchronized';
        $options{ file_class } ||= 'Backblaze::B2::v1::File::Synchronized';
    };
    
    bless \%options => $class
}

sub read_credentials {
    my( $self, @args ) = @_;
    $self->api->read_credentials(@args)

 view all matches for this distribution


Bio-Maxd

 view release on metacpan or  search on metacpan

lib/Bio/Maxd.pm  view on Meta::CPAN

  }
  if (!$ok) {
    print STDERR "WARNING: Run 'extendMaxD' to configure database\n";
    $data{'dbh'} = undef;
  }
  $self = bless {} => $class;
  foreach $tag (keys %data) { $self->{$tag} = $data{$tag}; }
  return $self;
}

sub export { 

 view all matches for this distribution


BioX-Seq

 view release on metacpan or  search on metacpan

lib/BioX/Seq/Stream.pm  view on Meta::CPAN


sub new {

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

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

    if (defined $fn) {

        my $fh = openhandle($fn); # can pass filehandle too;
        if (! defined $fh) { # otherwise assume filename

 view all matches for this distribution


Bot-BasicBot-Pluggable-Module-GitHub

 view release on metacpan or  search on metacpan

t/01-parse-config.t  view on Meta::CPAN

# returns them when asked for
package MockStore;
use strict;
sub new { 
    my ($class, $settings) = @_;
    return bless { settings => $settings } => $class; 
}
sub get {
    my ($self, $namespace, $key) = @_;
    return unless $namespace eq 'GitHub';
    return $self->{settings}{$key};

 view all matches for this distribution


Bot-BasicBot-Pluggable

 view release on metacpan or  search on metacpan

lib/Bot/BasicBot/Pluggable/Store.pm  view on Meta::CPAN

sub new {
    my $class = shift;
    my $self;
    my $logger = Log::Log4perl->get_logger($class);
    if ( @_ % 2 == 0 ) {
        $self = bless {@_} => $class;
    }
    elsif ( @_ == 1 and ref $_[0] eq 'HASH' ) {
        $self = $class->new_from_hashref( $_[0] );
    }
    elsif ( @_ == 1 and !ref $_[0] ) {
        $self = $class->new_from_hashref( { type => $_[0] } );
    }
    elsif ( !@_ ) {
        $self = bless {} => $class;
    }
    else {
        $logger->warn(
"Argument to new() is neither an argument list, a hashref, a string nor empty"
        );

 view all matches for this distribution


Bread-Board

 view release on metacpan or  search on metacpan

lib/Bread/Board/Service/Deferred.pm  view on Meta::CPAN


sub new {
    my ($class, %params) = @_;
    (Scalar::Util::blessed($params{service}) && $params{service}->does('Bread::Board::Service'))
        || Carp::confess "You can only defer Bread::Board::Service instances";
    bless { service => $params{service} } => $class;
}

sub meta {
    if ($_[0]->{service}->can('class')) {
        my $class = $_[0]->{service}->class;

 view all matches for this distribution


Brownie

 view release on metacpan or  search on metacpan

lib/Brownie/Session.pm  view on Meta::CPAN

            $self->{server}   = $server;
            $self->{app_host} = 'http://localhost:' . $server->port;
        }
    }

    return bless $self => $class;
}

sub DESTROY {
    my $self = shift;
    delete $self->{driver} if exists $self->{driver};

 view all matches for this distribution


C-Scan-Constants

 view release on metacpan or  search on metacpan

contrib/lib/ModPerl/CScan.pm  view on Meta::CPAN

        "$Cpp->{cppstdin} $Defines $addincludes $Cpp->{cppflags} $filename |" :
        "echo '\#include \"$filename\"' | $Cpp->{cppstdin} $Defines $addincludes $Cpp->{cppflags} $Cpp->{cppminus} |";
    #my $cmd = "echo '\#include <$filename>' | $Cpp->{cppstdin} $Defines $addincludes $Cpp->{cppflags} $Cpp->{cppminus} |";

    (open($sym, $cmd) or die "Cannot open pipe from `$cmd': $!")
      and bless $sym => $class;
}

sub text {
  my $class = shift;
  my $filter = shift;

 view all matches for this distribution


C-Scan

 view release on metacpan or  search on metacpan

Scan.pm  view on Meta::CPAN

    my $cmd = "echo '\#include \"$filename\"' | $Cpp->{cppstdin} $Defines $addincludes $Cpp->{cppflags} $Cpp->{cppminus} |";
    #my $cmd = "$Cpp->{cppstdin} $Defines $addincludes $Cpp->{cppflags} $Cpp->{cppminus} < $filename |";
    #my $cmd = "echo '\#include <$filename>' | $Cpp->{cppstdin} $Defines $addincludes $Cpp->{cppflags} $Cpp->{cppminus} |";

    (open($sym, $cmd) or die "Cannot open pipe from `$cmd': $!")
      and bless $sym => $class;
}

sub text {
  my $class = shift;
  my $filter = shift;

 view all matches for this distribution


CGI-Application-Structured-Tools

 view release on metacpan or  search on metacpan

lib/CGI/Application/Structured/Tools/Starter.pm  view on Meta::CPAN

    
     my $self = $class->SUPER::new(@opts);

     $self->{templates} = { $self->templates };
     $self->{renderer}  = $self->renderer;
     return bless $self => $class;
 }

=head2 create_distro ( %args ) 

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

 view all matches for this distribution


CGI-Builder-Auth

 view release on metacpan or  search on metacpan

lib/CGI/Builder/Auth/GroupAdmin/SQL.pm  view on Meta::CPAN

	       GROUPFIELD => "group",       #field for the group
	       );

sub new {
    my($class) = shift;
    my $self = bless { %Default, @_ } => $class;
    $self->_check(qw(DRIVER DB GROUPTABLE)); 
    if(!defined $self->{'DBH'}) { $self->db($self->{DB}) }
    else { $self->{'_DBH'} = $self->{'DBH'}; };
    return $self;
}

 view all matches for this distribution


CGI-Form-Table

 view release on metacpan or  search on metacpan

lib/CGI/Form/Table.pm  view on Meta::CPAN

 return unless $arg{columns};
 return unless $arg{prefix};
 $arg{initial_rows} = 1 unless $arg{initial_rows};
 $arg{initial_rows} = @{$arg{initial_values}}
  if ($arg{initial_values} && @{$arg{initial_values}} > $arg{initial_rows});
 bless \%arg => $class;
}

=head2 C<< $form->as_html >>

This returns HTML representing the form object.  JavaScript is required to make

 view all matches for this distribution


CGI-Header

 view release on metacpan or  search on metacpan

lib/CGI/Header.pm  view on Meta::CPAN

our $VERSION = '0.63';

sub new {
    my $class = shift;
    my %args = @_ == 1 ? %{$_[0]} : @_;
    ( bless \%args => $class )->_rehash;
}

sub header {
    $_[0]->{header} ||= {};
}

 view all matches for this distribution


CGI-JSONRPC

 view release on metacpan or  search on metacpan

lib/Apache2/JSONRPC/Session.pm  view on Meta::CPAN

1;

sub new {
   my ($class,%args) = @_;
   %args = __PACKAGE__->init_session(%args);
   return bless { dispatcher => $class->default_dispatcher, %args }, $class;
}

sub _generate_sid {
  my ($class,$r) = @_;
  # ok this makes me feel dirty but it's either use the id generate from

 view all matches for this distribution


CGI-MakeItStatic

 view release on metacpan or  search on metacpan

lib/CGI/MakeItStatic.pm  view on Meta::CPAN

$| = 1;

sub check{
  my($class, $q, $attr) = @_;
  my $self = {};
  bless $self => $class;
  $attr ||= {};
  $attr->{dir} or Carp::croak('usage: CGI::MakeItStatic->check($q, {dir => "data_dir"})');
  $attr->{renew_key}   ||= "renew";
  $attr->{keys}        ||= [];
  $attr->{forbid}      ||= sub {return 0};

 view all matches for this distribution


CPAN-Meta-Requirements

 view release on metacpan or  search on metacpan

lib/CPAN/Meta/Requirements.pm  view on Meta::CPAN

  $options ||= {};
  Carp::croak "Argument to $class\->new() must be a hash reference"
    unless ref $options eq 'HASH';
  my %self = map {; $_ => $options->{$_}} @valid_options;

  return bless \%self => $class;
}

# from version::vpp
sub _find_magic_vstring {
  my $value = shift;

 view all matches for this distribution


CPAN-Meta

 view release on metacpan or  search on metacpan

lib/CPAN/Meta/Feature.pm  view on Meta::CPAN

    identifier  => $identifier,
    description => $spec->{description},
    prereqs     => CPAN::Meta::Prereqs->new($spec->{prereqs}),
  );

  bless \%guts => $class;
}

#pod =method identifier
#pod
#pod This method returns the feature's identifier.

 view all matches for this distribution


CPAN-Mini

 view release on metacpan or  search on metacpan

lib/CPAN/Mini.pm  view on Meta::CPAN

    errors       => 1,
    mirrored     => {},
    log_level    => 'info',
  );

  my $self = bless { %defaults, @_ } => $class;

  $self->{dirmode} = $defaults{dirmode} unless defined $self->{dirmode};

  $self->{recent} = {};

 view all matches for this distribution


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