Result:
found 556 distributions and 1058 files matching your query ! ( run in 0.753 )


Term-Scroller

 view release on metacpan or  search on metacpan

lib/Term/Scroller.pm  view on Meta::CPAN


    defined(my $pid = fork)     or croak "unable to fork: $!";

    # Parent: Return the new scroller
    if ($pid) {
        bless $pty => $class;
        ${*$pty}{'term_scroller_pid'} = $pid;
        return $pty;
    }

    ################################################

 view all matches for this distribution


Test-AutoMock

 view release on metacpan or  search on metacpan

lib/Test/AutoMock/Mock/TieArray.pm  view on Meta::CPAN

use warnings;

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

    bless \$manager => $class;
}

sub FETCH {
    my ($self, $key) = @_;
    my $manager = $$self;

 view all matches for this distribution


Test-CVE

 view release on metacpan or  search on metacpan

lib/Test/CVE.pm  view on Meta::CPAN

    $self{meta_yml} ||= "META.yml";
    $self{make_pl}  ||= "Makefile.PL";
    $self{build_pl} ||= "Build.PL";
    $self{CVE}        = {};
    ref $self{want} or $self{want} = [ $self{want} ]; # new->(want => "Foo")
    my $obj = bless \%self => $class;
    $obj->skip ($self{skip} // "CVE.SKIP");
    return $obj;
    } # new

sub skip {

 view all matches for this distribution


Test-Harness

 view release on metacpan or  search on metacpan

lib/App/Prove/State/Result.pm  view on Meta::CPAN

    my ( $class, $arg_for ) = @_;
    $arg_for ||= {};
    my %instance_data = %$arg_for;    # shallow copy
    $instance_data{version} = $class->state_version;
    my $tests = delete $instance_data{tests} || {};
    my $self = bless \%instance_data => $class;
    $self->_initialize($tests);
    return $self;
}

sub _initialize {

 view all matches for this distribution


Test-Mock-Guard

 view release on metacpan or  search on metacpan

lib/Test/Mock/Guard.pm  view on Meta::CPAN

                ++$stash->{$class_name}->{$method_name}->{called_count};
                &$mocked_method;
            }, $prototype);
        }
    }
    return bless { restore => $restore, object => $object } => $class;
}

sub call_count {
    my ($self, $klass, $method_name) = @_;

 view all matches for this distribution


Test-Mock-Object

 view release on metacpan or  search on metacpan

lib/Test/Mock/Object/Chain.pm  view on Meta::CPAN


    my $last = pop @$chain;
    while ( my $method = pop @$chain ) {
        $last = _add_link( $method => $last );
    }
    return blessed $last ? $last : bless $last => $class;
}

sub _add_link {
    my ( $method, $value ) = @_;
    my $class = __PACKAGE__;

lib/Test/Mock/Object/Chain.pm  view on Meta::CPAN

        else {
            croak("Aref components in method chains must be [\$link, $value]");
        }
    }
    else {
        return bless { $method => $value } => $class;
    }
}

sub AUTOLOAD {
    my $self = shift;

 view all matches for this distribution


Test-Ranger

 view release on metacpan or  search on metacpan

lib/Test/Ranger.pm  view on Meta::CPAN

    
    if ( (reftype $self)->array ) {
        $self       = Test::Ranger::List->new($self);
    } 
    else {
        bless ($self => $class);
        $self->init();
    };
    
    return $self;
}; ## new

 view all matches for this distribution


Test-Reporter-Transport-Legacy

 view release on metacpan or  search on metacpan

lib/Test/Reporter/Transport/HTTPGateway.pm  view on Meta::CPAN

  my ($class, $url, $key) = @_;

  die "invalid gateway URL: must be absolute http or https URL"
    unless $url =~ /\Ahttps?:/i;

  bless { gateway => $url, key => $key } => $class;
}

sub send {
  my ($self, $report) = @_;

 view all matches for this distribution


Test-Reporter-Transport-Metabase-Fallback

 view release on metacpan or  search on metacpan

Fallback.pm  view on Meta::CPAN


    $args{'__metabase'} = Test::Reporter::Transport::Metabase->new( map { $_ => $args{$_} } grep { $args{$_} } @metabase_allowed_args );

    $args{'max_files'} = $MAX_FILES unless $args{'max_files'};

    return bless \%args => $class;
}


sub send {
    my ($self, $report) = @_;

 view all matches for this distribution


Test-Reporter-Transport-Metabase

 view release on metacpan or  search on metacpan

lib/Test/Reporter/Transport/Metabase.pm  view on Meta::CPAN

  for my $k ( keys %args ) {
    Carp::confess __PACKAGE__ . " unknown argument '$k'\n"
      unless grep { $k eq $_ } @allowed_args;
  }

  return bless \%args => $class;
}

#--------------------------------------------------------------------------#
# send
#--------------------------------------------------------------------------#

 view all matches for this distribution


Test-Reporter-Transport-Net-SMTP-Authen

 view release on metacpan or  search on metacpan

lib/Test/Reporter/Transport/Net/SMTP/Authen.pm  view on Meta::CPAN

    print STDERR 	"\to conf commit\n";
}

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

sub _net_class {
    my ($self) = @_;
    my $class = ref $self ? ref $self : $self;

 view all matches for this distribution


Test-Reporter-Transport-Socket

 view release on metacpan or  search on metacpan

lib/Test/Reporter/Transport/Socket.pm  view on Meta::CPAN


  if ( ref $args{host} eq 'ARRAY' and !scalar @{ $args{host} } ) {
    Carp::confess __PACKAGE__ . " requires 'host' argument to have elements if it is an arrayref\n";
  }

  return bless \%args => $class;
}

sub send {
  my ($self, $report) = @_;

 view all matches for this distribution


Test-Reporter

 view release on metacpan or  search on metacpan

lib/Test/Reporter/Transport/File.pm  view on Meta::CPAN

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

  die "target directory '$dir' doesn't exist or can't be written to"
    unless -d $dir && -w $dir;

  return bless { dir => $dir } => $class;
}

sub send {
    my ($self, $report) = @_;
    $report->dir( $self->{dir} );

 view all matches for this distribution


Test-SharedObject

 view release on metacpan or  search on metacpan

lib/Test/SharedObject/Lock.pm  view on Meta::CPAN


sub new {
    my ($class, $shared) = @_;
    open my $fh, '+<:raw', $shared->{file} or die "failed to open temporary file: $shared->{file}: $!"; # uncoverable branch
    flock $fh, LOCK_EX;
    return bless { fh => $fh } => $class;
}

sub fh { shift->{fh} }

sub DESTROY {

 view all matches for this distribution


Test-Unit-Lite

 view release on metacpan or  search on metacpan

lib/Test/Unit/Lite.pm  view on Meta::CPAN


    sub new {
        my ($class) = @_;
        $class = ref $class if ref $class;
        my $self = {};
        return bless $self => $class;
    }

    sub set_up { }

    sub tear_down { }

lib/Test/Unit/Lite.pm  view on Meta::CPAN

            'errors'   => 0,
            'failures' => 0,
            'passes'   => 0,
        };

        return bless $self => $class;
    }

    sub messages {
        my ($self) = @_;
        return $self->{messages};

lib/Test/Unit/Lite.pm  view on Meta::CPAN

        my $self = {
            'name' => defined $name ? $name : 'Test suite',
            'units' => [],
        };

        return bless $self => $class;
    }

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

lib/Test/Unit/Lite.pm  view on Meta::CPAN

        else {
            require Carp;
            Carp::croak(sprintf("usage: %s->new([CLASSNAME | TEST])\n", __PACKAGE__));
        }

        return bless $self => $class;
    }

    sub name {
        return $_[0]->{name};
    }

lib/Test/Unit/Lite.pm  view on Meta::CPAN

        my $self = {
            'suite'  => undef,
            'fh_out' => $fh_out,
            'fh_err' => $fh_err,
        };
        return bless $self => $class;
    }

    sub fh_out {
        my ($self) = @_;
        return $self->{fh_out};

 view all matches for this distribution


Test-Unit

 view release on metacpan or  search on metacpan

lib/Test/Unit/Assertion/CodeRef.pm  view on Meta::CPAN


sub new {
    my $class = shift;
    my $code = shift;
    croak "$class\::new needs a CODEREF" unless ref($code) eq 'CODE';
    bless \$code => $class;
}

sub do_assertion {
    my $self = shift;
    my $possible_object = $_[0];

 view all matches for this distribution


Test-Wiretap

 view release on metacpan or  search on metacpan

t/04-return-value-capturing.t  view on Meta::CPAN

{
  package ValueHolder;

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

 view all matches for this distribution


Test-WriteVariants

 view release on metacpan or  search on metacpan

lib/Test/WriteVariants.pm  view on Meta::CPAN


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

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

    for my $attribute (qw(allow_dir_overwrite allow_file_overwrite))
    {
        next unless exists $args{$attribute};
        $self->$attribute(delete $args{$attribute});

 view all matches for this distribution


Text-Bidi

 view release on metacpan or  search on metacpan

lib/Text/Bidi.pm  view on Meta::CPAN

    my $self = {
        tie_byte => 'Text::Bidi::Array::Byte',
        tie_long => 'Text::Bidi::Array::Long',
        @_
    };
    bless $self => $class
}


sub tie_byte {
    my $self = shift;

 view all matches for this distribution


Text-CSV-Simple

 view release on metacpan or  search on metacpan

lib/Text/CSV/Simple.pm  view on Meta::CPAN


=cut

sub new {
	my $class = shift;
	return bless { _parser => Text::CSV_XS->new(@_), } => $class;
}

sub _parser { shift->{_parser} }

sub _file {

 view all matches for this distribution


Text-CSV_PP-Simple

 view release on metacpan or  search on metacpan

lib/Text/CSV_PP/Simple.pm  view on Meta::CPAN

use Text::CSV_PP;
use IO::File;

sub new {
    my $class = shift;
    return bless { _parser => Text::CSV_PP->new(@_), } => $class;
}

sub field_map {
    my $self = shift;
    if (@_) {

 view all matches for this distribution


Text-FrontMatter-YAML

 view release on metacpan or  search on metacpan

lib/Text/FrontMatter/YAML.pm  view on Meta::CPAN

=cut

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

    my %args = @_;

    # make sure we get something to init with
    unless (

 view all matches for this distribution


Text-Index

 view release on metacpan or  search on metacpan

lib/Text/Index.pm  view on Meta::CPAN

			};
			$self->{keywords}{$_->[0]} = $clone;
		}
	}

	return bless $self => $class;
}

=item add_page

Adds a page to the index object. The page is expected to be

 view all matches for this distribution


Text-Kakasi

 view release on metacpan or  search on metacpan

Kakasi.pm  view on Meta::CPAN

}

sub new{
    my $thingy = shift;
    my $class = ref $thingy ? ref $thingy : $thingy;
    my $self = bless {} => $class;
    @_ and $self->set(@_);
    return $self
}

my %k2p = 

 view all matches for this distribution


Text-Markup

 view release on metacpan or  search on metacpan

lib/Text/Markup.pm  view on Meta::CPAN


sub format_matchers { %REGEX_FOR }

sub new {
    my $class = shift;
    bless { default_encoding => 'UTF-8', @_ } => $class;
}

sub parse {
    my $self = shift;
    my %p = @_;

 view all matches for this distribution


Text-Repository

 view release on metacpan or  search on metacpan

Repository.pm  view on Meta::CPAN

# Instantiates a new instance.  There is very little setup here;
# all the work (adding paths, etc) is handled by add_path.
#
sub new {
    my $class = shift;
    my $self = bless [ { }, [ ], \@_, ] => $class;
    $self->add_path(@_);

    return $self;
}

 view all matches for this distribution


Text-TemplateFill

 view release on metacpan or  search on metacpan

TemplateFill.pm  view on Meta::CPAN

		'StartPageTag'	=>	' ',		# Which tag to use to auto start a page, undef doesn't work - space is dodge
		'EndPageTag'	=>	' ',		# Which tag to use to auto end a page
		'CalcHandle'	=>	$CalcHandle,	# For calculations
	);

	return bless \%template => $class;
}

# Set an option in the %template.
sub SetOpt {
	my $self = shift @_;

 view all matches for this distribution


Text-WordDiff

 view release on metacpan or  search on metacpan

lib/Text/WordDiff.pm  view on Meta::CPAN


package Text::WordDiff::Base;

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


sub file_header  {
    my $self = shift;

 view all matches for this distribution


Text-Xslate

 view release on metacpan or  search on metacpan

t/900_bugs/033_ex_safe_render.t  view on Meta::CPAN

use Test::More;
use File::Temp qw(tempdir);

{
    package MyCounter;
    sub new { my $class = shift;bless {@_} => $class }
    sub incr  { shift->{count}++ }
    sub decr  { shift->{count}-- }
    sub count { shift->{count} }
}

 view all matches for this distribution


Tie-Amazon-S3

 view release on metacpan or  search on metacpan

lib/Tie/Amazon/S3.pm  view on Meta::CPAN

    my $list = $self->{BUCKET}->list_all or $self->s3_croak;
    map { $key{$_} => sub { $self->{BUCKET}->get_key($_)
                                or $self->s3_croak; } }
        @{ $list->{keys} };
    $self->{KEYS} = \%key;
    bless $self => $class;
}

=head2 STORE

Store some scalar into an S3 bucket (Perl hash) key.

 view all matches for this distribution


( run in 0.753 second using v1.01-cache-2.11-cpan-00829025b61 )