Result:
found more than 1074 distributions - search limited to the first 2001 files matching your query ( run in 0.506 )


Backblaze-B2

 view release on metacpan or  search on metacpan

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


1;

package Backblaze::B2::v1::Bucket;
use strict;
use Scalar::Util 'weaken';

sub new {
    my( $class, %options ) = @_;
    weaken $options{ parent };
    
    # Whoa! We assume that the async version has the same class name
    # as the synchronous version and just strip it off.
    $options{ file_class } =~ s!::Synchronized$!!;
    

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


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

package Backblaze::B2::v1::File;
use strict;
#use Scalar::Util 'weaken'; # do we really want to weaken our link?!
# The bucket doesn't hold a ref to us, so we don't want to weaken it

sub new {
    my( $class, %options ) = @_;
    #weaken $options{ bucket };
    #warn "$class: " . join ",", sort keys %options;
    
    bless \%options => $class,
}

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

sub downloadUrl { join "/", $_[0]->bucket->downloadUrl, $_[0]->name }

package Backblaze::B2::v1::File::Synchronized;
use strict;
use Carp qw(croak);
#use Scalar::Util 'weaken'; # do we really want to weaken our link?!
# The bucket doesn't hold a ref to us, so we don't want to weaken it

sub new {
    my( $class, %options ) = @_;
    #weaken $options{ bucket };
    #warn "$class: " . join ",", sort keys %options;
    croak "Need impl" unless $options{ impl };
    
    bless \%options => $class,
}

 view all matches for this distribution


BackupPC-XS

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

sv_reftype|||
sv_release_COW|||
sv_replace|||
sv_report_used|||
sv_reset|||
sv_rvweaken||5.006000|
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p

 view all matches for this distribution


Badger

 view release on metacpan or  search on metacpan

lib/Badger/Utils.pm  view on Meta::CPAN

our $WARN     = sub { warn @_ };  # for testing - see t/core/utils.t
our $MESSAGES = { };
our $HELPERS  = {       # keep this compact in case we don't need to use it
    'Digest::MD5'        => 'md5 md5_hex md5_base64',
    'Scalar::Util'       => 'blessed dualvar isweak readonly refaddr reftype
                             tainted weaken isvstring looks_like_number
                             set_prototype',
    'List::Util'         => 'first max maxstr min minstr reduce shuffle sum',
    'List::MoreUtils'    => 'any all none notall true false firstidx
                             first_index lastidx last_index insert_after
                             insert_after_string apply after after_incl before

 view all matches for this distribution


Barcode-ZBar

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

sv_release_COW|||
sv_release_IVX|||
sv_replace|||
sv_report_used|||
sv_reset|||
sv_rvweaken||5.006000|
sv_setiv_mg|5.006000||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.006000||p

 view all matches for this distribution


Basset

 view release on metacpan or  search on metacpan

lib/Basset/NotificationCenter.pm  view on Meta::CPAN


=cut

$VERSION = '1.02';

use Scalar::Util qw(weaken isweak);

use Basset::Object;
our @ISA = Basset::Object->pkg_for_type('object');

use strict;

lib/Basset/NotificationCenter.pm  view on Meta::CPAN

	
	#this is off for now, 'til I think of how to deal with the case of objects that exist
	#only in the notification center, such as loggers
	#
	#we don't want the notification center to keep observer objects around by mistake.
	#weaken($init{'observer'}) if ref $init{'observer'};
	
	return 1;
};

=pod

 view all matches for this distribution


Beam-Emitter

 view release on metacpan or  search on metacpan

lib/Beam/Emitter.pm  view on Meta::CPAN


use strict;
use warnings;

use Types::Standard qw(:all);
use Scalar::Util qw( weaken refaddr );
use Carp qw( croak );
use Beam::Event;
use Module::Runtime qw( use_module );
use Moo::Role; # Put this last to ensure proper, automatic cleanup

lib/Beam/Emitter.pm  view on Meta::CPAN

      unless use_module($class)->isa( 'Beam::Listener' );

    my $listener = $class->new( %args, callback => $sub );

    push @{ $self->_listeners->{$name} }, $listener;
    weaken $self;
    weaken $sub;
    return sub {
        $self->unsubscribe($name => $sub)
	  if defined $self;
    };
}

 view all matches for this distribution


Beam-Minion

 view release on metacpan or  search on metacpan

lib/Beam/Minion/Util.pm  view on Meta::CPAN

use strict;
use warnings;
use Exporter qw( import );
use Minion;
use Beam::Runner::Util qw( find_containers );
use Scalar::Util qw( weaken );
use Mojolicious;
use Mojo::Log;
use Beam::Wire;


 view all matches for this distribution


Beekeeper

 view release on metacpan or  search on metacpan

examples/dashboard/lib/Beekeeper/Service/Dashboard/Worker.pm  view on Meta::CPAN

use Beekeeper::Service::LogTail;
use Beekeeper::Config;

use AnyEvent;
use JSON::XS;
use Scalar::Util 'weaken';
use Digest::SHA 'sha256_hex';
use Fcntl qw(:DEFAULT :flock);
use Time::HiRes;

use constant AVERAGE => 0;

examples/dashboard/lib/Beekeeper/Service/Dashboard/Worker.pm  view on Meta::CPAN

}


sub _init_collector {
    my ($self) = @_;
    weaken($self);

    $self->_load_state;

    $self->{services_1s}  ||= [];
    $self->{services_5s}  ||= [];

 view all matches for this distribution


Benchmark-DKbench

 view release on metacpan or  search on metacpan

data/t/recipes/basics_binarytree_attributefeatures.t  view on Meta::CPAN

ok($root->has_left, '... we have a left node now');

ok($left->has_parent, '... lefts has a parent');
is($left->parent, $root, '... lefts parent is the root');

ok(isweak($left->{parent}), '... parent is a weakened ref');

ok(!$left->has_left, '... $left no left node yet');
ok(!$left->has_right, '... $left no right node yet');

is($left->node, undef, '... left has got no node value');

data/t/recipes/basics_binarytree_attributefeatures.t  view on Meta::CPAN

ok($root->has_right, '... we have a right node now');

ok($right->has_parent, '... rights has a parent');
is($right->parent, $root, '... rights parent is the root');

ok(isweak($right->{parent}), '... parent is a weakened ref');

# make a left node of the left node

my $left_left = $left->left;
isa_ok($left_left, 'BinaryTree');

data/t/recipes/basics_binarytree_attributefeatures.t  view on Meta::CPAN


is($left_left->parent, $left, '... got a parent node (and it is $left)');
ok($left->has_left, '... we have a left node now');
is($left->left, $left_left, '... got a left node (and it is $left_left)');

ok(isweak($left_left->{parent}), '... parent is a weakened ref');

# make a right node of the left node

my $left_right = BinaryTree->new;
isa_ok($left_right, 'BinaryTree');

data/t/recipes/basics_binarytree_attributefeatures.t  view on Meta::CPAN


is($left_right->parent, $left, '... got a parent node (and it is $left)');
ok($left->has_right, '... we have a left node now');
is($left->right, $left_right, '... got a left node (and it is $left_left)');

ok(isweak($left_right->{parent}), '... parent is a weakened ref');

# and check the error

isnt(
    exception {

 view all matches for this distribution


Benchmark-Featureset-SetOps

 view release on metacpan or  search on metacpan

html/setops.report.html  view on Meta::CPAN

<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>136: weaken</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>

 view all matches for this distribution


Benchmark-Perl-Formance-Cargo

 view release on metacpan or  search on metacpan

share/PerlCritic/Critic/Document.pm  view on Meta::CPAN


use PPI::Document;
use PPI::Document::File;

use List::Util qw< reduce >;
use Scalar::Util qw< blessed weaken >;
use version;

use Perl::Critic::Annotation;
use Perl::Critic::Exception::Parse qw< throw_parse >;
use Perl::Critic::Utils qw< :booleans :characters shebang_line >;

share/PerlCritic/Critic/Document.pm  view on Meta::CPAN


        my %cache = ( 'PPI::Document' => [ $self ] );

        # The cache refers to $self, and $self refers to the cache.  This
        # creates a circular reference that leaks memory (i.e.  $self is not
        # destroyed until execution is complete).  By weakening the reference,
        # we allow perl to collect the garbage properly.
        weaken( $cache{'PPI::Document'}->[0] );

        my $finder_coderef = _caching_finder( \%cache );
        $self->{_doc}->find( $finder_coderef );
        $self->{_elements_of} = \%cache;
    }

 view all matches for this distribution


BerkeleyDB

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

SvROK_off|5.003007|5.003007|
SvROK_on|5.003007|5.003007|
SvRV|5.003007|5.003007|
SvRV_const|5.010001||Viu
SvRV_set|5.009003|5.003007|p
sv_rvunweaken|5.027004|5.027004|
sv_rvweaken|5.006000|5.006000|
SvRVx|5.003007||Viu
SvRX|5.009005|5.003007|p
SvRXOK|5.009005|5.003007|p
SV_SAVED_COPY|5.009005||Viu
SvSCREAM|5.003007||Viu

 view all matches for this distribution


Bio-ASN1-EntrezGene

 view release on metacpan or  search on metacpan

t/data/entrezgene.dat  view on Meta::CPAN

      update-date
        str "Jun 23 2004  5:16PM" } ,
    {
      type generif ,
      text "cellular generation of peroxynitrite may contribute to
 carcinogenesis and tumor progression by weakening key cellular defense
 enzymes such as arylamine N-acetyltransferase 1 (NAT1)" ,
      version 0 ,
      refs {
        pmid 14672957 } ,
      create-date

 view all matches for this distribution


Bio-CIPRES

 view release on metacpan or  search on metacpan

lib/Bio/CIPRES/Job.pm  view on Meta::CPAN

    '""' => sub {return $_[0]->{handle}};

use Carp;
use Time::Piece;
use XML::LibXML;
use Scalar::Util qw/blessed weaken/;
use List::Util qw/first/;

use Bio::CIPRES::Error;
use Bio::CIPRES::Message;
use Bio::CIPRES::Output;

lib/Bio/CIPRES/Job.pm  view on Meta::CPAN


    croak "Must define user agent" if (! defined $args{agent});
    croak "Agent must be an LWP::UserAgent object"
        if ( blessed($args{agent}) ne 'LWP::UserAgent' );
    $self->{agent} = $args{agent};
    weaken( $self->{agent} );

    croak "Must define initial status" if (! defined $args{dom});
    $self->_parse_status( $args{dom} );

    return $self;

 view all matches for this distribution


Bio-DB-Big

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

sv_reftype|||
sv_release_COW|||
sv_replace|||
sv_report_used|||
sv_reset|||
sv_rvweaken||5.006000|
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p

 view all matches for this distribution


Bio-DB-HTS

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

sv_reftype|||
sv_release_COW|||
sv_replace|||
sv_report_used|||
sv_reset|||
sv_rvweaken||5.006000|
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p

 view all matches for this distribution


Bio-Emboss

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

sv_release_COW|||
sv_release_IVX|||
sv_replace|||
sv_report_used|||
sv_reset|||
sv_rvweaken||5.006000|
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p

 view all matches for this distribution


Bio-EnsEMBL

 view release on metacpan or  search on metacpan

lib/Bio/EnsEMBL/ArchiveStableId.pm  view on Meta::CPAN

use strict;
use warnings;
no warnings qw(uninitialized);

use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Scalar::Util qw(weaken isweak);

=head2 new

  Arg [STABLE_ID]      : String $stable_id 
  Arg [VERSION]        : Int $version 

lib/Bio/EnsEMBL/ArchiveStableId.pm  view on Meta::CPAN

      'type' => $_[5],
      'adaptor' => $_[6],
      'current_version' => $_[7],
  }, $class;

  weaken($self->{adaptor})  if ( ! isweak($self->{adaptor}) );

  return $self;
}


lib/Bio/EnsEMBL/ArchiveStableId.pm  view on Meta::CPAN

  return $self->{'type'};
}

sub adaptor {
  my $self = shift;
  weaken($self->{'adaptor'} = shift) if (@_);
  return $self->{'adaptor'};
}

sub successors {
  my $self = shift;

 view all matches for this distribution


Bio-GMOD

 view release on metacpan or  search on metacpan

t/More.pm  view on Meta::CPAN


  use Test::More tests => $Num_Tests;

There are rare cases when you will not know beforehand how many tests
your script is going to run.  In this case, you can declare that you
have no plan.  (Try to avoid using this as it weakens your test.)

  use Test::More qw(no_plan);

In some cases, you'll want to completely skip an entire testing script.

 view all matches for this distribution


Bio-MAGETAB

 view release on metacpan or  search on metacpan

lib/Bio/MAGETAB/BaseClass.pm  view on Meta::CPAN


use Moose;
use MooseX::FollowPBP;

use Carp;
use Scalar::Util qw(weaken);

use MooseX::Types::Moose qw( Str );

has 'authority'           => ( is         => 'rw',
                               isa        => Str,

lib/Bio/MAGETAB/BaseClass.pm  view on Meta::CPAN

    if ( blessed $self eq __PACKAGE__ ) {
        confess("ERROR: Attempt to instantiate abstract class " . __PACKAGE__);
    }

    if ( my $container = __PACKAGE__->get_ClassContainer() ) {
        weaken $self;
        $container->add_objects( $self );
    }

    return;
}

 view all matches for this distribution


Bio-MUST-Core

 view release on metacpan or  search on metacpan

lib/Bio/MUST/Core/SeqId.pm  view on Meta::CPAN

    return $instance_for{$key} if defined $instance_for{$key};

    # create a new instance
    my $instance = $class->new(%args);
    $instance_for{$key} = $instance;
    # Note: do not weaken reference or this will defeat the purpose.
    # However, this could lead to memory leak in some extreme cases.
    # Scalar::Util::weaken $instance_for{$key};

    return $instance;
}


 view all matches for this distribution


Bio-Phylo

 view release on metacpan or  search on metacpan

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

use warnings;
use Bio::PhyloRole;
use base 'Bio::PhyloRole';

# don't use Scalar::Util::looks_like_number directly, use wrapped version
use Scalar::Util qw'weaken blessed';
use Bio::Phylo::Util::CONSTANT '/looks_like/';
use Bio::Phylo::Util::IDPool;             # creates unique object IDs
use Bio::Phylo::Util::Exceptions 'throw'; # defines exception classes and throws
use Bio::Phylo::Util::Logger;             # for logging, like log4perl/log4j
use Bio::Phylo::Util::MOP;                # for traversing inheritance trees

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

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

        # register for get_obj_by_id
        my $id = $self->get_id;
        $objects{$id} = $self;
        weaken( $objects{$id} );
		
	# notify user
        $logger->info("constructor called for '$class' - $id");

        # processing arguments

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

        if ( blessed $container ) {
            if ( $container->can('can_contain') ) {
                if ( $container->can_contain($self) ) {
                    if ( $container->contains($self) ) {
                        $container{$id} = $container;
                        weaken( $container{$id} );                        
                    }
                    else {
                        throw 'ObjectMismatch' => "'$self' not in '$container'";
                    }
                }

 view all matches for this distribution


Bio-RNA-BarMap

 view release on metacpan or  search on metacpan

lib/Bio/RNA/BarMap/Mapping/MinMappingEntry.pm  view on Meta::CPAN

use warnings;

use Moose;
use namespace::autoclean;

use Scalar::Util qw( weaken );

use Bio::RNA::BarMap::Mapping::Type;
use Bio::RNA::BarMap::Mapping::Set;


lib/Bio/RNA/BarMap/Mapping/MinMappingEntry.pm  view on Meta::CPAN

    predicate   => 'has_to',
    isa         => __PACKAGE__,             # another entry
);

# Always use this method to add 'from' minima. This ensures the refs
# are weakened and no memory leaks arise.
sub add_from {
    my ($self, @from) = @_;
    weaken $_ foreach @from;                # turn into weak references
    $self->_from->insert(@from);
}

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

lib/Bio/RNA/BarMap/Mapping/MinMappingEntry.pm  view on Meta::CPAN


=head2 $entry->add_from(@from_entries)

Adds entries to the set of source minima, i. e. those that are mapped to this
minimum. This method makes sure that the stored references are properly
weakened and no memory leaks arise.

=head2 $entry->get_from

Returns the entries of minima that are mapped to this minimum, as stored in
the source minima set.

 view all matches for this distribution


BioPerl-DB

 view release on metacpan or  search on metacpan

t/lib/Test/More.pm  view on Meta::CPAN


  use Test::More tests => $Num_Tests;

There are rare cases when you will not know beforehand how many tests
your script is going to run.  In this case, you can declare that you
have no plan.  (Try to avoid using this as it weakens your test.)

  use Test::More qw(no_plan);

B<NOTE>: using no_plan requires a Test::Harness upgrade else it will
think everything has failed.  See L<CAVEATS and NOTES>).

 view all matches for this distribution


BioPerl-Network

 view release on metacpan or  search on metacpan

t/lib/Test/More.pm  view on Meta::CPAN


  use Test::More tests => $Num_Tests;

There are rare cases when you will not know beforehand how many tests
your script is going to run.  In this case, you can declare that you
have no plan.  (Try to avoid using this as it weakens your test.)

  use Test::More qw(no_plan);

B<NOTE>: using no_plan requires a Test::Harness upgrade else it will
think everything has failed.  See L<CAVEATS and NOTES>).

 view all matches for this distribution


BioPerl

 view release on metacpan or  search on metacpan

Bio/Assembly/Contig.pm  view on Meta::CPAN

use strict;

use Bio::DB::SeqFeature::Store; # isa Bio::SeqFeature::CollectionI
use Bio::Seq::PrimaryQual;      # isa Bio::Seq::QualI

use Scalar::Util qw(weaken);

use base qw(Bio::Root::Root Bio::Align::AlignI);

=head1 Object creator

Bio/Assembly/Contig.pm  view on Meta::CPAN

    $self->throw("Using non Bio::Assembly::Scaffold object when assign contig to assembly")
    if (defined $assembly && ! $assembly->isa("Bio::Assembly::Scaffold"));
    # We create a circular reference to a Scaffold object. It is made weak
    # to prevent memory leaks.
    $self->{'_assembly'} = $assembly if (defined $assembly);
    weaken($self->{'_assembly'});

    return $self->{'_assembly'};
}

=head2 strand

 view all matches for this distribution


Bit-Fast

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

sv_reftype|||
sv_release_COW|||
sv_replace|||
sv_report_used|||
sv_reset|||
sv_rvweaken||5.006000|
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p

 view all matches for this distribution


Bit-Grep

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

sv_reftype|||
sv_release_COW|||
sv_replace|||
sv_report_used|||
sv_reset|||
sv_rvweaken||5.006000|
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p

 view all matches for this distribution


Bit-Util

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

sv_reftype|||
sv_release_COW|||
sv_replace|||
sv_report_used|||
sv_reset|||
sv_rvweaken||5.006000|
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p

 view all matches for this distribution


( run in 0.506 second using v1.01-cache-2.11-cpan-3b35f9de6a3 )