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


AI-FuzzyInference

 view release on metacpan or  search on metacpan

FuzzyInference.pm  view on Meta::CPAN

63
64
65
66
67
68
69
70
71
72
73
sub new {
    my $self  = shift;
    my $class = ref($self) || $self;
 
    my $obj = bless {} => $class;
 
    $obj->_init;
 
    return $obj;
}

 view all matches for this distribution


API-GitForge

 view release on metacpan or  search on metacpan

lib/API/GitForge/Role/GitForge.pm  view on Meta::CPAN

33
34
35
36
37
38
39
40
41
42
43
    my ($class, %opts) = @_;
    croak "need domain!" unless exists $opts{domain};
 
    my %attrs = (_domain => $opts{domain});
    $attrs{_access_token} = $opts{access_token} if exists $opts{access_token};
    my $self = bless \%attrs => $class;
 
    $self->_make_api;
 
    return $self;
}

 view all matches for this distribution


Acme-Chef

 view release on metacpan or  search on metacpan

lib/Acme/Chef.pm  view on Meta::CPAN

78
79
80
81
82
83
84
85
86
87
88
my $code = shift;
defined $code or croak "compile takes one argument: a code string.";
 
my $self = {};
 
bless $self => $class;
 
my @paragraphs = $self->_get_paragraphs( $code );
my @recipes    = $self->_paragraphsToRecipes(\@paragraphs);
 
$_->compile() foreach @recipes;

 view all matches for this distribution


Acme-Perl-Consensual

 view release on metacpan or  search on metacpan

lib/Acme/Perl/Consensual.pm  view on Meta::CPAN

106
107
108
109
110
111
112
113
114
115
116
        my ($class, %args) = @_;
        $args{locale} = $ENV{LC_ALL} || $ENV{LC_LEGAL} || 'en_XX.UTF-8'
                unless exists $args{locale};
        $args{locale} = $1
                if $args{locale} =~ /^.._(.+?)(\.|$)/;
        bless \%args => $class;
}
 
sub locale
{
        lc shift->{locale};

 view all matches for this distribution


Acme-Teddy

 view release on metacpan or  search on metacpan

lib/Acme/Teddy.pm  view on Meta::CPAN

75
76
77
78
79
80
81
82
83
84
#
sub new {
    my $class   = shift;
    my $self    = shift || {};      # default: hashref
     
    bless ($self => $class);
    $self->init(@_);
     
    return $self;
}; ## new

 view all matches for this distribution


ActiveRecord-Simple

 view release on metacpan or  search on metacpan

lib/ActiveRecord/Simple/Find.pm  view on Meta::CPAN

17
18
19
20
21
22
23
24
25
26
27
sub new {
    my ($self_class, $class, @param) = @_;
 
    #my $self = $class->new();
    my $self = bless { class => $class } => $self_class;
 
    my $table_name = ($self->{class}->can('_get_table_name'))  ? $self->{class}->_get_table_name  : undef;
    my $pkey       = ($self->{class}->can('_get_primary_key')) ? $self->{class}->_get_primary_key : undef;
 
    croak 'can not get table_name for class ' . $self->{class} unless $table_name;

 view all matches for this distribution


Algorithm-IncludeExclude

 view release on metacpan or  search on metacpan

lib/Algorithm/IncludeExclude.pm  view on Meta::CPAN

152
153
154
155
156
157
158
159
160
161
162
    my $class = shift;
    my $args = shift || {};
    $args->{join} ||= ''; # avoid warnings
    $args->{regexes} = {};
    my $self = [undef, {}, $args];
    return bless $self => $class;
}
 
# walks down the tree and sets the value of path to value
sub _set {
    my $tree  = shift;

 view all matches for this distribution


Algorithm-LibLinear

 view release on metacpan or  search on metacpan

lib/Algorithm/LibLinear/DataSet.pm  view on Meta::CPAN

12
13
14
15
16
17
18
19
20
21
22
sub new {
    args
        my $class => ClassName,
        my $data_set => ArrayRef[FeatureWithLabel];
 
    bless +{ data_set => $data_set } => $class;
}
 
sub load {
    args
        my $class => ClassName,

 view all matches for this distribution


Alt-CPAN-Uploader-tinyua

 view release on metacpan or  search on metacpan

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

150
151
152
153
154
155
156
157
158
159
160
sub new {
  my ($class, $arg) = @_;
 
  $arg->{$_} or Carp::croak("missing $_ argument") for qw(user password);
  bless $arg => $class;
}
 
=method read_config_file
 
  my $config = CPAN::Uploader->read_config_file( $filename );

 view all matches for this distribution


Android-ElectricSheep-Automator

 view release on metacpan or  search on metacpan

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

119
120
121
122
123
124
125
126
127
128
129
        'apps' => {},
 
        # legacy, no worries.
        'apps-roundabout-way' => undef,
};
bless $self => $class;
 
# this will read configuration and create confighash,
# make logger, verbosity,
# instantiate any objects we need here etc.
if( $self->init($params) ){ print STDERR __PACKAGE__."${whoami} (via $parent), line ".__LINE__." : error, call to init() has failed.\n"; return undef }

 view all matches for this distribution


Aniki

 view release on metacpan or  search on metacpan

lib/Aniki/Row/Joined.pm  view on Meta::CPAN

7
8
9
10
11
12
13
14
15
16
17
use Carp qw/croak/;
 
sub new {
    my ($class, @rows) = @_;
    my %rows = map { $_->table_name => $_ } @rows;
    return bless \%rows => $class;
}
 
sub can {
    my ($invocant, $method) = @_;
    my $code = $invocant->SUPER::can($method);

 view all matches for this distribution


AntTweakBar

 view release on metacpan or  search on metacpan

lib/AntTweakBar.pm  view on Meta::CPAN

186
187
188
189
190
191
192
193
194
195
196
        unless defined $name;
    my $self = {
        _name    => $name,
        _bar_ptr => _create( $name ),
    };
    bless $self => $class;
    $self->set_bar_params(%bar_params);
    return $self;
}
 
sub DESTROY {

 view all matches for this distribution


AnyEvent-Beanstalk-Worker

 view release on metacpan or  search on metacpan

lib/AnyEvent/Beanstalk/Worker.pm  view on Meta::CPAN

11
12
13
14
15
16
17
18
19
20
21
our $VERSION = '0.05';
 
sub new {
    my $class = shift;
    my $self  = {};
    bless $self => $class;
 
    my %args = @_;
 
    $self->{_cb}     = {};
    $self->{_event}  = {};

 view all matches for this distribution


AnyEvent-CouchDB

 view release on metacpan or  search on metacpan

lib/AnyEvent/CouchDB.pm  view on Meta::CPAN

123
124
125
126
127
128
129
130
131
132
133
}
 
sub new {
  my ($class, $uri) = @_;
  $uri ||= 'http://localhost:5984/';
  my $self = bless { uri => URI->new($uri) } => $class;
  if (my $userinfo = $self->{uri}->userinfo) {
    my $auth = encode_base64($userinfo, '');
    $self->{http_auth} = "Basic $auth";
  }
  return $self;

 view all matches for this distribution


AnyEvent-I3

 view release on metacpan or  search on metacpan

lib/AnyEvent/I3.pm  view on Meta::CPAN

195
196
197
198
199
200
201
202
203
204
205
        my $home = (getpwuid($<))[7];
        confess "Could not get home directory" unless $home and -d $home;
        $path =~ s/~/$home/g;
    }
 
    bless { path => $path } => $class;
}
 
=head2 $i3->connect
 
Establishes the connection to i3. Returns an C<AnyEvent::CondVar> which will

 view all matches for this distribution


AnyEvent-Sway

 view release on metacpan or  search on metacpan

lib/AnyEvent/Sway.pm  view on Meta::CPAN

198
199
200
201
202
203
204
205
206
207
208
        my $home = (getpwuid($<))[7];
        confess "Could not get home directory" unless $home and -d $home;
        $path =~ s/~/$home/g;
    }
 
    bless { path => $path } => $class;
}
 
=head2 $sway->connect
 
Establishes the connection to Sway. Returns an C<AnyEvent::CondVar> which will

 view all matches for this distribution


Apache-Dir

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN

10
11
12
13
14
15
16
17
18
19
20
{
    package Apache::FakeRequest;
    no warnings 'redefine';
    sub new {
        my $class = shift;
        bless { @_ } => $class;
    }
    sub content_type { shift->{content_type}      }
    sub uri          { shift->{uri}               }
    sub args         { shift->{args}              }
    sub header_out   {

 view all matches for this distribution


Apache-LoggedAuthDBI

 view release on metacpan or  search on metacpan

DBI.pm  view on Meta::CPAN

779
780
781
782
783
784
785
786
787
788
789
790
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


Apache2-API

 view release on metacpan or  search on metacpan

lib/Apache2/API/Query.pm  view on Meta::CPAN

111
112
113
114
115
116
117
118
119
120
121
        }
        $new = $self;
    }
    else
    {
        $new = bless( $hash => $class );
    }
    CORE::return( $new );
}
 
1;

 view all matches for this distribution


Apache2-SSI

 view release on metacpan or  search on metacpan

t/SSITest.pm  view on Meta::CPAN

20
21
22
23
24
25
26
27
28
29
30
{
    my( $class, $r ) = @_;
    $r->log_error( "${class}: Received request for uri \"", $r->uri, "\" matching file \"", $r->filename, "\"." );
    my $uri = APR::URI->parse( $r->pool, $r->uri );
    my $path = [split( '/', $uri->path )]->[-1];
    my $self = bless( { apache_request => $r, debug => int( $r->dir_config( 'Apache2_SSI_DEBUG' ) ) } => $class );
    my $code = $self->can( $path );
    if( !defined( $code ) )
    {
        $r->log_error( "No method \"$path\" for SSI testing." );
        return( Apache2::Const::DECLINED );

 view all matches for this distribution


App-Addex-AddressBook-Abook

 view release on metacpan or  search on metacpan

lib/App/Addex/AddressBook/Abook.pm  view on Meta::CPAN

44
45
46
47
48
49
50
51
52
53
54
#pod =cut
 
sub new {
  my ($class, $arg) = @_;
 
  my $self = bless {} => $class;
 
  $arg->{filename} ||= File::Spec->catfile(
    File::HomeDir->my_home,
    '.abook',
    'addressbook',

 view all matches for this distribution


App-Addex

 view release on metacpan or  search on metacpan

lib/App/Addex.pm  view on Meta::CPAN

47
48
49
50
51
52
53
54
55
56
57
sub mvp_multivalue_args  { qw(output plugin) }
 
sub new {
  my ($class, $arg) = @_;
 
  my $self = bless {} => $class;
 
  # XXX: keep track of seen/unseen classes; carp if some go unused?
  # -- rjbs, 2007-04-06
 
  for my $core (qw(addressbook)) {

 view all matches for this distribution


App-Benchmark-Accessors

 view release on metacpan or  search on metacpan

lib/App/Benchmark/Accessors.pm  view on Meta::CPAN

101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package    # hide from PAUSE
  WithClassXSAccessor;
use Class::XSAccessor accessors => { myattr => 'myattr' };
sub new {
    my $class = shift;
    bless { @_ } => $class;
}
 
package    # hide from PAUSE
  WithClassXSAccessorArray;
use Class::XSAccessor::Array accessors => { myattr => 0 };
sub new {
    my $class = shift;
    my %args = @_;
    bless [ $args{myattr} ] => $class;
}
 
package    # hide from PAUSE
  WithObjectTinyXS;
use Object::Tiny qw/myattr/;

 view all matches for this distribution


App-Cmd

 view release on metacpan or  search on metacpan

lib/App/Cmd/Command.pm  view on Meta::CPAN

53
54
55
56
57
58
59
60
61
62
63
#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


App-Cronjob

 view release on metacpan or  search on metacpan

lib/App/Cronjob.pm  view on Meta::CPAN

265
266
267
268
269
270
271
272
273
274
{
  package App::Cronjob::Exception 1.200014;
 
  sub new {
    my ($class, $type, $text, $extra) = @_;
    bless { type => $type, text => $text, extra => $extra } => $class;
  }
}
 
1;

 view all matches for this distribution


App-Grepl

 view release on metacpan or  search on metacpan

lib/App/Grepl/Base.pm  view on Meta::CPAN

42
43
44
45
46
47
48
49
50
51
52
    my $reftype = reftype $arg_for || 'SCALAR';
    unless ( 'HASH' eq $reftype ) {
        $class->_croak("Argument to new must be a hashref, not a ($reftype)");
    }
 
    my $self = bless {} => $class;
    $self->_initialize($arg_for);
    return $self;
}
 
sub _croak {

 view all matches for this distribution


App-Physics-ParticleMotion

 view release on metacpan or  search on metacpan

lib/App/Physics/ParticleMotion.pm  view on Meta::CPAN

25
26
27
28
29
30
31
32
33
        my $self = {
                run => 0,
                config => Config::Tiny->new(),
        };
        bless $self => $class;
 
        return $self;
}

 view all matches for this distribution


App-SimpleBackuper

 view release on metacpan or  search on metacpan

lib/App/SimpleBackuper/DB/BaseTable.pm  view on Meta::CPAN

9
10
11
12
13
14
15
16
17
18
19
        my($class, $number_of_records) = @_;
         
        $number_of_records //= 0;
        my @arr = (undef) x $number_of_records;
         
        return bless \@arr => $class;
}
 
sub find_row {
        my $self = shift;
        my($from, $to) = $self->_find(@_);

 view all matches for this distribution


App-TaskBuilder

 view release on metacpan or  search on metacpan

lib/App/TaskBuilder.pm  view on Meta::CPAN

18
19
20
21
22
23
24
25
26
27
28
}
BEGIN { _accessor($_) for qw(name require include version output) }
 
sub new {
  my $class = shift;
  my $self = bless {@_} => $class;
  $self->{output} ||= $self->vars->{dist_vname} . ".tar.gz";
  %{ $self->require } = (
    (map {
      my %r = %{ do($_) || die $@ };
      (

 view all matches for this distribution


( run in 0.882 second using v1.01-cache-2.11-cpan-26ccb49234f )