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


Data-TableReader

 view release on metacpan or  search on metacpan

t/35-record-iterator.t  view on Meta::CPAN

			fields => ['a','b','c'],
			log => $log
		], 'TableReader' );
	ok( $re->find_table, 'find_table' ) or die "Can't continue without table";
	ok( my $i= $re->iterator, 'create iterator' );
	Scalar::Util::weaken( my $wref= $i );
	undef $i;
	is( $wref, undef, 'first iterator garbage collected' );
	ok( my $i2= $re->iterator, 'second interator' );
	ok( my $i3= $re->iterator, 'third iterator' );
	is( $i2->row, 1, 'i2 row=1' );

 view all matches for this distribution


Data-TagDB

 view release on metacpan or  search on metacpan

lib/Data/TagDB.pm  view on Meta::CPAN


use v5.10;
use strict;
use warnings;

use Scalar::Util qw(weaken blessed);

use Carp;
use DBI;

use Data::TagDB::Tag;

lib/Data/TagDB.pm  view on Meta::CPAN

            $self->_cache_maintain;
            $done = 0;
        }

        $cache->{$dbid} = $tag;
        weaken($cache->{$dbid});

        return $tag;
    }
}

 view all matches for this distribution


Data-Trace

 view release on metacpan or  search on metacpan

lib/Data/Tie/Watch.pm  view on Meta::CPAN


use 5.006;
use strict;
use warnings;
use Carp;
use Scalar::Util qw( reftype weaken );

our $VERSION = '1.302.2';
our %METHODS;

=head1 SYNOPSIS

lib/Data/Tie/Watch.pm  view on Meta::CPAN

    }

    $watch_obj->{id}   = "$watch_obj";
    $watch_obj->{type} = $type;

    # weaken $watch_obj->{-variable};

    $watch_obj;
}

=head2 DESTROY

 view all matches for this distribution


Data-TxnBuffer

 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


Data-ULID-XS

 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


Data-URIID

 view release on metacpan or  search on metacpan

lib/Data/URIID/Barcode.pm  view on Meta::CPAN

use v5.16;
use strict;
use warnings;

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

our $VERSION = v0.22;

use parent 'Data::URIID::Base';

lib/Data/URIID/Barcode.pm  view on Meta::CPAN

    }

    croak 'No type given' unless defined $opts{type};
    croak 'No data given' unless defined $opts{data};

    weaken($opts{extractor});

    $self = bless \%opts, $pkg;

    return $self;
}

 view all matches for this distribution


Data-UUID-LibUUID

 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


Data-UUID-MT

 view release on metacpan or  search on metacpan

lib/Data/UUID/MT.pm  view on Meta::CPAN

use Math::Random::MT::Auto;
use Scalar::Util 1.10 ();
use Time::HiRes ();

# track objects across threads for reseeding
my ($can_weaken, @objects);
$can_weaken = Scalar::Util->can('weaken');
sub CLONE { defined($_) && $_->reseed for @objects }

# HoH: $builders{$Config{uvsize}}{$version}
my %builders = (
  '8' => {

lib/Data/UUID/MT.pm  view on Meta::CPAN


  bless $self, $class;

  $self->{_iterator} = $self->_build_iterator;

  if ($can_weaken) {
    push @objects, $self;
    Scalar::Util::weaken($objects[-1]);
  }

  return $self;
}

lib/Data/UUID/MT.pm  view on Meta::CPAN

=head2 reseed

  $ug->reseed;

Reseeds the internal pseudo-random number generator.  This happens
automatically after a fork or thread creation (assuming Scalar::Util::weaken),
but may be called manually if desired for some reason.

Any arguments provided are passed to Math::Random::MT::Auto::srand() for
custom seeding.

lib/Data/UUID/MT.pm  view on Meta::CPAN

Pseudo-random number generators used in generating UUIDs should be reseeded if
the process forks or if threads are created.

Data::UUID::MT checks if the process ID has changed before generating a UUID
and reseeds if necessary.  If L<Scalar::Util> is installed and provides
C<weaken()>, Data::UUID::MT will also reseed its objects on thread creation.

Data::UUID::LibUUID will reseed on fork on Mac OSX.

I have not explored further whether other UUID generators are fork/thread safe.

 view all matches for this distribution


Data-Undump

 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


Data-Validate-CSV

 view release on metacpan or  search on metacpan

lib/Data/Validate/CSV/Cell.pm  view on Meta::CPAN

requires '_chunk_for_key_string';

has raw_value       => ( is => 'ro', isa => Str );
has row_number      => ( is => 'ro', isa => Maybe[PositiveInt] );
has col_number      => ( is => 'ro', isa => Maybe[PositiveInt] );
has row             => ( is => 'ro', isa => Object, weaken => !!1 );
has col             => ( is => 'ro', isa => Object, weaken => !!1, handles => ['datatype'] );

has _errors => (
	is        => 'lazy',
	builder   => sub { [] },
);

 view all matches for this distribution


Data-Visitor

 view release on metacpan or  search on metacpan

lib/Data/Visitor.pm  view on Meta::CPAN

package Data::Visitor; # git description: v0.31-4-g7498abb
use Moose;
# ABSTRACT: Visitor style traversal of Perl data structures

our $VERSION = '0.32';
use Scalar::Util qw/blessed refaddr reftype weaken isweak/;
use overload ();
use Symbol ();

use Tie::ToObject;

lib/Data/Visitor.pm  view on Meta::CPAN

	isa => "Bool",
	is  => "rw",
);

# currently broken
has weaken => (
	isa => "Bool",
	is  => "rw",
	default => 0,
);

lib/Data/Visitor.pm  view on Meta::CPAN


	foreach my $data ( @_ ) {
		$self->trace( flow => visit => $data ) if DEBUG;

		if ( my $refaddr = ref($data) && refaddr($data) ) { # only references need recursion checks
			$seen_hash->{weak} ||= isweak($data) if $self->weaken;

			if ( exists $seen_hash->{$refaddr} ) {
				$self->trace( mapping => found_mapping => from => $data, to => $seen_hash->{$refaddr} ) if DEBUG;
				push @ret, $self->visit_seen( $data, $seen_hash->{$refaddr} );
				next;

lib/Data/Visitor.pm  view on Meta::CPAN


			if ( @weak_refs ) {
				my %targets = map { refaddr($_) => 1 } @{ $self->{_seen} }{@weak_refs};
				foreach my $value ( Data::Alias::deref($new) ) {
					if ( ref $value and $targets{refaddr($value)}) {
						push @{ $seen_hash->{weakened} ||= [] }, $value; # keep a ref around
						weaken($value);
					}
				}
			}
		}
		else {

 view all matches for this distribution


Data-WeakMap

 view release on metacpan or  search on metacpan

lib/Data/WeakMap/Key/Tie.pm  view on Meta::CPAN

package Data::WeakMap::Key::Tie;
use 5.014;
use warnings FATAL => 'all';

use Scalar::Util 'weaken';
use Carp 'croak';

our $VERSION = "v0.0.4";

sub TIESCALAR {
    my ($class, $weakmap, $key) = @_;

    my $self = { weakmap => $weakmap, prop => "$key", key => $key };
    weaken($self->{$_}) foreach qw/ weakmap key /;

    bless $self, $class;
}

sub FETCH {

 view all matches for this distribution


Data-XHash

 view release on metacpan or  search on metacpan

lib/Data/XHash.pm  view on Meta::CPAN

use Scalar::Util qw/blessed/;

our @EXPORT_OK = (qw/&xhash &xhashref &xh &xhn &xhr &xhrn/);

# XHash values are stored internally using a ring doubly-linked with
# unweakened references:
# {hash}{$key} => [$previous_link, $next_link, $value, $key]

=head1 NAME

Data::XHash - Extended, ordered hash (commonly known as an associative array

lib/Data/XHash.pm  view on Meta::CPAN

sub CLEAR {
    my ($this) = @_;
    my $self = tied(%$this) || $this;

    if ($self->{hash}) {
	# Blow away unweakened refs before tossing the hash.
	@$_ = () foreach (values %{$self->{hash}});
    }
    $self->{hash} = {};
    delete $self->{tail};
    delete $self->{iter};

 view all matches for this distribution


DataLoader

 view release on metacpan or  search on metacpan

t/cache-clear-all.t  view on Meta::CPAN

use DataLoader::Test qw(await);

use AnyEvent;
use Data::Dump qw(dump);
use Mojo::Promise;
use Scalar::Util qw(weaken);

use DataLoader;

subtest 'Complex cache behaviour via clear_all()', sub {
    # The loader clears its cache as soon as the batch function is

 view all matches for this distribution


DataStore-CAS-FS

 view release on metacpan or  search on metacpan

lib/DataStore/CAS/FS.pm  view on Meta::CPAN

			# See if the directory contains this entry
			if (defined (my $subent= $nodes->[-1]{dir}->get_entry($name))) {
				$subnode= { dirent => $subent };
				my $key= $self->case_insensitive? uc $name : $name;
				# Weak reference, until _apply_overrides is called.
				Scalar::Util::weaken( $nodes->[-1]{subtree}{$key}= $subnode );
			}
		}

		# If we haven't found one, or if it is 0 (deleted), either create or die.
		if (!$subnode) {

lib/DataStore/CAS/FS.pm  view on Meta::CPAN

	my ($self, $dir)= @_;
	# Hold onto a strong reference for a while.
	$self->{_recent}[ $self->{_recent_idx}++ ]= $dir;
	$self->{_recent_idx}= 0 if $self->{_recent_idx} > @{$self->{_recent}};
	# Index it using a weak reference.
	Scalar::Util::weaken( $self->{_by_hash}{$dir->hash}= $dir );
	# Now, a nifty hack: we attach an object to watch for the destriction of the
	# directory.  Lazy references will get rid of the dir object, but this cleans
	# up our _by_hash index.
	$dir->{'#DataStore::CAS::FS::DirCacheCleanup'}=
		bless [ $self->{_by_hash}, $dir->hash ], 'DataStore::CAS::FS::DirCacheCleanup';

 view all matches for this distribution


DataStructure

 view release on metacpan or  search on metacpan

lib/DataStructure/BTree/Node.pm  view on Meta::CPAN

use utf8;
use feature ':5.24';
use feature 'signatures';
no warnings 'experimental::signatures';

use Scalar::Util qw(weaken);

sub new ($class, $tree, $value, $parent = undef, $left = undef, $right = undef) {
  my $self = bless {
    tree => $tree,
    parent => $parent,
    left => $left,
    right => $right,
    value => $value,
  }, $class;
  weaken($self->{tree});
  return $self;
}

sub parent ($self) {
  return $self->{parent};

 view all matches for this distribution


Database-Async-Engine-PostgreSQL

 view release on metacpan or  search on metacpan

lib/Database/Async/Engine/PostgreSQL.pm  view on Meta::CPAN

    # and the user can decide whether SSL is mandatory or optional.
    $stream = await $self->negotiate_ssl(
        stream => $stream,
    );

    Scalar::Util::weaken($self->{stream} = $stream);
    $self->outgoing->each(sub {
        $log->tracef('Write bytes [%v02x]', $_);
        $self->ready_for_query->set_string('');
        $self->stream->write("$_");
        return;

 view all matches for this distribution


Database-Async-SQLite

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

sv_ref||5.015004|
sv_replace|||
sv_report_used|||
sv_resetpvn|||
sv_reset|||
sv_rvweaken||5.006000|
sv_sethek|||
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||

 view all matches for this distribution


Database-Async

 view release on metacpan or  search on metacpan

lib/Database/Async.pm  view on Meta::CPAN


=cut

async sub transaction {
    my ($self, @args) = @_;
    Scalar::Util::weaken(
        $self->{transactions}[@{$self->{transactions}}] =
            my $txn = Database::Async::Transaction->new(
                database => $self,
                @args
            )

 view all matches for this distribution


Date-LibICal

 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


DateTime-Format-Builder

 view release on metacpan or  search on metacpan

lib/DateTime/Format/Builder/Parser.pm  view on Meta::CPAN


use Carp qw( croak );
use Params::Validate qw(
    validate SCALAR CODEREF UNDEF ARRAYREF
);
use Scalar::Util qw( weaken );

sub on_fail {
    my ( $self, $input ) = @_;
    my $maker = $self->maker;
    if ( $maker and $maker->can('on_fail') ) {

lib/DateTime/Format/Builder/Parser.pm  view on Meta::CPAN

sub set_maker {
    my $self  = shift;
    my $maker = shift;

    $self->{maker} = $maker;
    weaken $self->{maker}
        if ref $self->{maker};

    return $self;
}

 view all matches for this distribution


DateTime-Format-Lite

 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


DateTime-Lite

 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


DateTime-Span-Birthdate

 view release on metacpan or  search on metacpan

inc/Spiffy.pm  view on Meta::CPAN

      "  return \$_[0]->{%s} = do { my \$self = \$_[0]; %s }\n" .
      "    unless \$#_ > 0 or defined \$_[0]->{%s};\n",
    weak_init =>
      "  return do {\n" .
      "    \$_[0]->{%s} = do { my \$self = \$_[0]; %s };\n" .
      "    Scalar::Util::weaken(\$_[0]->{%s}) if ref \$_[0]->{%s};\n" .
      "    \$_[0]->{%s};\n" .
      "  } unless \$#_ > 0 or defined \$_[0]->{%s};\n",
    return_if_get => 
      "  return \$_[0]->{%s} unless \$#_ > 0;\n",
    set => 
      "  \$_[0]->{%s} = \$_[1];\n",
    weaken => 
      "  Scalar::Util::weaken(\$_[0]->{%s}) if ref \$_[0]->{%s};\n",
    sub_end => 
      "  return \$_[0]->{%s};\n}\n",
);

sub field {

inc/Spiffy.pm  view on Meta::CPAN

        local *paired_arguments = sub { (qw(-package -init)) };
        Spiffy->parse_arguments(@_);
    };
    my ($field, $default) = @values;
    $package = $args->{-package} if defined $args->{-package};
    die "Cannot have a default for a weakened field ($field)"
        if defined $default && $args->{-weak};
    return if defined &{"${package}::$field"};
    require Scalar::Util if $args->{-weak};
    my $default_string =
        ( ref($default) eq 'ARRAY' and not @$default )

inc/Spiffy.pm  view on Meta::CPAN

    }
    $code .= sprintf $code{set_default}, $field, $default_string, $field
      if defined $default;
    $code .= sprintf $code{return_if_get}, $field;
    $code .= sprintf $code{set}, $field;
    $code .= sprintf $code{weaken}, $field, $field 
      if $args->{-weak};
    $code .= sprintf $code{sub_end}, $field;

    my $sub = eval $code;
    die $@ if $@;

 view all matches for this distribution


DateTime

 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


Debug-Flags

 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


Debug-Runopt

 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


Deep-Encode

 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


Defaults-Modern

 view release on metacpan or  search on metacpan

lib/Defaults/Modern.pm  view on Meta::CPAN

  Carp->import::into($pkg,
    qw/carp croak confess/,
  );

  Scalar::Util->import::into($pkg,
    qw/blessed reftype weaken/,
  );
  
  # Pragmas
  strictures->import::into($pkg, version => 2);
  bareword::filehandles->unimport;

lib/Defaults/Modern.pm  view on Meta::CPAN


B<carp>, B<croak>, and B<confess> error reporting tools from L<Carp>

=item *

B<blessed>, B<reftype>, and B<weaken> utilities from L<Scalar::Util>

=item *

All of the L<List::Objects::WithUtils> object constructors (B<array>,
B<array_of>, B<immarray>, B<immarray_of>, B<hash>, B<hash_of>, B<immhash>,

 view all matches for this distribution


Deliantra

 view release on metacpan or  search on metacpan

Deliantra/Data.pm  view on Meta::CPAN

	    }
	  ]
	]
      ]
    ],
    use => 'Monsters play a central role in most maps. Choosing the right combination of monsters for your map is vital: <UL> <LI> Place only monsters of slightly varying (increasing) strength. It\'s no fun to play for two hours just to find out the ...
  },
  'Monster (Grimreaper)' => {
    desc => 'A grimreaper is a monster that vanishes after it did some number of draining attacks.',
    ignore => [
      'material',

 view all matches for this distribution


( run in 2.084 seconds using v1.01-cache-2.11-cpan-600a1bdf6e4 )