view release on metacpan or search on metacpan
lib/Data/Clone.xs view on Meta::CPAN
if(SvOBJECT(sv)){
sv_bless(cloned, SvSTASH(sv));
}
return SvWEAKREF(cloning) ? sv_rvweaken(cloned) : cloned;
}
/* as SV* sv_clone(SV* sv) */
SV*
Data_Clone_sv_clone(pTHX_ SV* const sv) {
view all matches for this distribution
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
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
view release on metacpan or search on metacpan
lib/Data/Decycle.pm view on Meta::CPAN
package Data::Decycle;
use 5.008001;
use warnings;
use strict;
use Carp;
use Scalar::Util qw/refaddr weaken isweak/;
our $VERSION = sprintf "%d.%02d", q$Revision: 0.2 $ =~ /(\d+)/g;
our $DEBUG = 0;
use base 'Exporter';
our @EXPORT = ();
our @EXPORT_OK = qw(recsub $CALLEE
may_leak has_cyclic_ref decycle_deeply weaken_deeply
);
our %EXPORT_TAGS = ( all => [ @EXPORT, @EXPORT_OK ], );
BEGIN {
require constant;
lib/Data/Decycle.pm view on Meta::CPAN
}
*_decycle_deeply = _mkwalker { undef $_[0] };
sub decycle_deeply($) { _decycle_deeply( $_[0], {} ) }
*_weaken_deeply = _mkwalker {
weaken $_[0] unless UNIVERSAL::isa( $_[0], 'CODE' )
};
sub weaken_deeply($) { _weaken_deeply( $_[0], {} ) }
1; # End of Data::Decycle
__END__
=head1 NAME
lib/Data/Decycle.pm view on Meta::CPAN
use Data::Decycle ':all';
my $obj = bless {}, 'Dummy';
$obj->{me} = $obj;
print may_leak($obj); # true
weaken_deeply($obj);
print may_leak($obj); # false
print has_cyclic_ref($obj); # true
decycle_deeply($obj);
print $obj->{me} == undef; # true
lib/Data/Decycle.pm view on Meta::CPAN
say "($son) may leak ? ", $son->may_leak? 'yes' : 'no';
$mom->{son} = $son;
$son->{mom} = $mom;
say "($mom) has cyclic ref ? ", $mom->has_cyclic_ref ? 'yes' : 'no';
say "($son) may leak ? ", $son->may_leak? 'yes' : 'no';
$mom->weaken_deeply;
$son->weaken_deeply;
say "($mom) has cyclic ref ? ", $mom->has_cyclic_ref ? 'yes' : 'no';
say "($son) may leak ? ", $son->may_leak? 'yes' : 'no';
}
lib/Data/Decycle.pm view on Meta::CPAN
Perl programmers love to hate cyclic References, or circular
references. It easly leaks out of perl's reference-counter based
garbage collection and stays there until perl exits.
Even with the introduction of weak references in Perl 5.8, you still
have to tell perl explicitly to weaken references and which reference
to weaken is tricky.
use Devel::Peek;
use Scalar::Util qw/weaken/;
my $obj = {you => $ENV{USER}};
$obj->{me} = $obj;
weaken($obj); # wrong
weaken($obj->{me}) # right;
In addition to that, weak references do not work with code references.
my $cref;
$cref = sub { $_[0] <= 1 ? 1 : $_[0] * $cref->( $_[0] - 1 ) };
print $cref->(10);
weaken($cref); # does undef($cref)
print $cref->(10); # goodbye
This module offers something easier than that.
=head2 HOW DOES IT WORK?
lib/Data/Decycle.pm view on Meta::CPAN
checks if cyclic reference exists in C<$obj>.
=head2 decycle_deeply($obj)
C<undef>s all duplicate references in C<$obj> thus breaks all cyclic
reference. Unlike C<weaken_deeply>, it decycles even code
references. You shouldn't call it yourself; let C<decycle> take care
of it.
=head2 weaken_deeply($obj)
weaken all duplicate references in C<$obj>. Unlike C<decycle_deeply>
it leaves code references intact. So you can safely call it but you
are at your own if C<$obj> contains a code reference that cycles.
=head2 recsub { }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/DublinCore.pm view on Meta::CPAN
use Log::Report 'data-dublincore', syntax => 'SHORT';
use XML::Compile::Util qw/type_of_node unpack_type pack_type SCHEMA2001/;
use XML::LibXML::Simple qw/XMLin/;
use Scalar::Util qw/weaken/;
use Data::DublinCore::Util;
use XML::Compile::Util qw/XMLNS/;
lib/Data/DublinCore.pm view on Meta::CPAN
my $r = $args->{opts_readers} ||= {};
$r = $args->{opts_readers} = +{ @$r } if ref $r eq 'ARRAY';
$r->{mixed_elements} = 'XML_NODE';
my $s = $self;
weaken $s; # avoid memory leak
# $r->{mixed_elements} = sub { $s->_handle_any_type(@_) };
$r->{any_type} = sub { $s->_handle_any_type(@_) };
$args->{any_element} ||= 'ATTEMPT';
$self->SUPER::init($args);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Dump/Streamer.pm view on Meta::CPAN
lock_ref_keys_plus
lock_keys_plus
SvREADONLY_ref
SvREFCNT_ref
isweak
weaken
weak_refcount
readonly_set
Dumper
lib/Data/Dump/Streamer.pm view on Meta::CPAN
lock_keys
lock_ref_keys_plus
lock_keys_plus
alias_to
dualvar
weaken
usqz
)
],
special => [qw( readonly_set )],
all => [ @EXPORT, @EXPORT_OK ],
lib/Data/Dump/Streamer.pm view on Meta::CPAN
dualvar
blessed reftype refaddr refcount sv_refcount
readonly looks_like_number regex is_numeric
make_ro readonly_set reftype_or_glob
refaddr_or_glob globname
weak_refcount isweak weaken
)
],
);
lib/Data/Dump/Streamer.pm view on Meta::CPAN
\*$item{$t}, $depth + 1,
$type . "{$t}", refcount(\*$item{$t}) ];
}
}
#use Scalar::Util qw(weaken);
$self;
}
sub Data {
my $self= shift->_safe_self;
lib/Data/Dump/Streamer.pm view on Meta::CPAN
$self->_dump_rv($item, $depth + 1, $dumped, $name, $indent,
$is_ref && !$add_do);
}
$self->{fh}->print("$optspace}")
if $add_do;
$self->_add_fix('sub call', 'weaken', $name)
if $self->{svw}{$addr};
return;
}
sub _brace {
lib/Data/Dump/Streamer.pm view on Meta::CPAN
regex($var) # In list context returns the pattern and the modifiers,
# in scalar context returns the pattern in (?msix:) form.
# If not a regex returns false.
readonly($var) # returns whether the $var is readonly
weaken($var) # cause the reference contained in var to become weak.
make_ro($var) # causes $var to become readonly, returns the value of $var.
reftype_or_glob # returns the reftype of a reference, or if its not
# a reference but a glob then the globs name
refaddr_or_glob # similar to reftype_or_glob but returns an address
# in the case of a reference.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Dumper/Interp.pm view on Meta::CPAN
use if $bitwise_supported, "feature", "bitwise";
use Data::Dumper ();
use Carp;
use POSIX qw(INT_MAX);
use Scalar::Util qw(blessed reftype refaddr looks_like_number weaken);
use List::Util 1.45 qw(min max first none all any sum0);
use Data::Structure::Util qw/circular_off/;
use Regexp::Common qw/RE_balanced/;
use Term::ReadKey ();
use Sub::Identify qw/sub_name sub_fullname get_code_location/;
lib/Data/Dumper/Interp.pm view on Meta::CPAN
tlen => 0, # incremented below
children => [],
C => undef,
parent => $context,
};
weaken( $child->{parent} );
push @{ $context->{children} }, $child;
$context = $child;
}
elsif ($mode eq "close") {
oops if defined($context->{C});
lib/Data/Dumper/Interp.pm view on Meta::CPAN
tlen => length($lhs),
children => [ $lhs ],
C => undef,
parent => $context,
};
weaken($newchild->{parent});
$context->{children}->[-1] = $newchild;
$context = $newchild;
atom($_[0]); # the " => "
oops unless $context == $newchild;
$context->{CLOSE_AFTER_NEXT} = 1;
view all matches for this distribution
view release on metacpan or search on metacpan
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
view release on metacpan or search on metacpan
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
view release on metacpan or search on metacpan
lib/Data/Frame/Partial/Sugar.pm view on Meta::CPAN
use namespace::autoclean;
package Tie::Data::Frame {
$Tie::Data::Frame::VERSION = '0.006004';
use Scalar::Util qw(weaken);
use Types::PDL qw(Piddle);
use Types::Standard qw(ArrayRef Value);
use Type::Params;
sub new {
my ($class, $object) = @_;
my $self = bless( { _object => $object }, $class);
weaken( $self->{_object} );
return $self;
}
sub TIEHASH {
my $class = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
t/020_common_exceptions.t view on Meta::CPAN
use strict;
use warnings;
use Data::Google::Visualization::DataTable;
use Test::More;
use Scalar::Util qw(weaken);
BEGIN {
eval "use Test::Exception";
plan skip_all => "Test::Exception needed for these tests" if $@;
}
t/020_common_exceptions.t view on Meta::CPAN
# Nonsense column p
{
my $datatable = Data::Google::Visualization::DataTable->new();
my $circular = [];
push(@$circular, $circular);
weaken $circular;
throws_ok
{ $datatable->add_columns( { type => 'string', p => $circular } ) }
qr/Serializing 'p' failed/,
"Unserializable p caught";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Handle.pm view on Meta::CPAN
my %datastash;
use Symbol qw( gensym );
use Scalar::Util qw( weaken );
use parent qw( IO::File );
use Package::Stash 0.15; # has_symbol
use Carp ();
use Data::Handle::Exception;
use Data::Handle::IO;
lib/Data/Handle.pm view on Meta::CPAN
. "\n" );
}
my $sym = gensym();
my $xsym = $sym;
weaken($xsym);
## no critic( ProhibitTies )
tie *{$sym}, 'Data::Handle::IO', { self => $xsym };
${ *{$sym} }{stash} = {};
bless $sym, $class;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Header/Fields.pm view on Meta::CPAN
1;
package Data::Header::Fields::Value;
use Scalar::Util 'weaken', 'isweak';
use overload
'""' => \&as_string,
'cmp' => \&cmp,
;
lib/Data/Header/Fields.pm view on Meta::CPAN
$value = { $value, @_ };
}
my $self = bless { 'parent' => $class->_default_parent, %{$value} }, $class;
weaken($self->{'parent'})
if (ref($self->{'parent'}) && !isweak($self->{'parent'}));
return $self;
}
lib/Data/Header/Fields.pm view on Meta::CPAN
}
1;
package Data::Header::Fields::Line;
use Scalar::Util 'blessed', 'weaken', 'isweak';
use overload
'""' => \&as_string,
'cmp' => \&cmp,
;
lib/Data/Header/Fields.pm view on Meta::CPAN
'parent' => $line,
);
}
}
weaken($line->{'parent'})
if (ref($line->{'parent'}) && !isweak($line->{'parent'}));
return bless $line, $class;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/IconText.pm view on Meta::CPAN
use v5.20;
use strict;
use warnings;
use Carp;
use Scalar::Util qw(looks_like_number weaken);
use Data::Identifier v0.12;
use constant {
WK_UNICODE_CP => Data::Identifier->new(uuid => '5f167223-cc9c-4b2f-9928-9fe1b253b560')->register, # unicode-code-point
WK_ASCII_CP => Data::Identifier->new(uuid => 'f4b073ff-0b53-4034-b4e4-4affe5caf72c')->register, # ascii-code-point
lib/Data/IconText.pm view on Meta::CPAN
my $v = delete $opts{$key};
next unless defined $v;
croak 'Invalid type for key: '.$key unless eval {$v->isa($_types{$key})};
$self->{$key} //= $v;
croak 'Missmatch for key: '.$key unless $self->{$key} == $v;
weaken($self->{$key}) if $weak;
}
croak 'Stray options passed' if scalar keys %opts;
return $self;
lib/Data/IconText.pm view on Meta::CPAN
A L<File::FStore> object.
=item C<weak>
Marks the value for all subobjects as weak.
If only a specific one needs needs to be weaken use L</attach>.
=back
=head2 unicode
view all matches for this distribution
view release on metacpan or search on metacpan
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
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
view release on metacpan or search on metacpan
lib/Data/Monad/Base/Monad.pm view on Meta::CPAN
sub ap { (ref $_[0])->map_multi(sub { my $c = shift; $c->(@_) } => @_) }
sub while {
my ($self, $predicate, $f) = @_;
my $weaken_loop;
my $loop = sub {
my @v = @_;
$predicate->(@v) ? $f->(@v)->flat_map($weaken_loop)
: (ref $self)->unit(@v);
};
Scalar::Util::weaken($weaken_loop = $loop);
$self->flat_map($loop);
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Morph/Backend/DBIC.pm view on Meta::CPAN
use MooseX::Types::Moose(':all');
use MooseX::Params::Validate;
use Devel::PartialDump('dump');
use namespace::autoclean;
use DBIx::Class;
use Scalar::Util('weaken');
has result_set =>
(
is => 'ro',
lib/Data/Morph/Backend/DBIC.pm view on Meta::CPAN
sub _build_new_instance
{
my ($self) = @_;
weaken($self);
return sub { $self->result_set->new_result({}) };
}
sub epilogue
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/MuForm/Field.pm view on Meta::CPAN
package Data::MuForm::Field;
# ABSTRACT: Base field package
use Moo;
use Types::Standard -types;
use Try::Tiny;
use Scalar::Util ('blessed', 'weaken');
use Data::Clone ('data_clone');
use Data::MuForm::Localizer;
use Data::MuForm::Merge ('merge');
with 'Data::MuForm::Common';
lib/Data/MuForm/Field.pm view on Meta::CPAN
sub BUILD {
my $self = shift;
if ( $self->form ) {
# To avoid memory cycles it needs to be weakened when
# it's set through a form.
weaken($self->{localizer});
weaken($self->{renderer});
}
else {
# Vivify. This would generally only happen in a standalone field, in tests.
$self->localizer;
$self->renderer;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Munge.pm view on Meta::CPAN
sub rec (&) {
my ($f) = @_;
sub { $f->(CORE::__SUB__, @_) }
}
EOT
} elsif (eval { require Scalar::Util } && defined &Scalar::Util::weaken) {
*rec = sub (&) {
my ($f) = @_;
my $w;
my $r = $w = sub { $f->($w, @_) };
Scalar::Util::weaken($w);
$r
};
} else {
# slow but always works
*rec = sub (&) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Object/Attributes.pm view on Meta::CPAN
};
my $example = Example::HasWkr->new(data => $data);
This package supports the C<wkr> and C<weak_ref> directives is used to denote if
the attribute's value should be weakened. See the L<Moo> documentation for more
details.
=cut
=head2 has-wrt
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/ObjectDriver/BaseObject.pm view on Meta::CPAN
package Data::ObjectDriver::BaseObject;
use strict;
use warnings;
our $HasWeaken;
eval q{ use Scalar::Util qw(weaken) }; ## no critic
$HasWeaken = !$@;
use Carp ();
use Class::Trigger qw( pre_save post_save post_load pre_search
lib/Data/ObjectDriver/BaseObject.pm view on Meta::CPAN
## Hold in a variable here too, so we don't lose it immediately
## by having only the weak reference.
my $ret = $parentclass->lookup($id);
if ($HasWeaken) {
$obj->{$cachekey} = $ret;
weaken($obj->{$cachekey});
}
return $ret;
};
} else {
if (ref($column)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/ObjectStore.pm view on Meta::CPAN
no warnings 'numeric';
no warnings 'uninitialized';
no warnings 'recursion';
use File::Path qw( make_path );
use Scalar::Util qw(weaken);
use Time::HiRes qw(time);
use vars qw($VERSION);
use Data::RecordStore;
use Data::ObjectStore::Cache;
lib/Data/ObjectStore.pm view on Meta::CPAN
$self->[CACHE]->stow( $id, $ref );
}
$self->[WEAK]{$id} = $ref;
weaken( $self->[WEAK]{$id} );
} #_store_weak
sub _dirty {
my( $self, $id ) = @_;
view all matches for this distribution
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
view release on metacpan or search on metacpan
share/dictionary.txt view on Meta::CPAN
we'd
we'll
we're
we've
weak
weaken
weakened
weakening
weakens
weaker
weakest
weakfish
weakfish's
weakfishes
view all matches for this distribution
view release on metacpan or search on metacpan
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
view release on metacpan or search on metacpan
lib/Data/Password/zxcvbn/RankedDictionaries/English.pm view on Meta::CPAN
'waves' => 3107,
'wayans' => 28057,
'waynesboro' => 26682,
'wazir' => 23336,
'waziristan' => 22378,
'weakened' => 4878,
'weakening' => 8805,
'weakens' => 26179,
'weakly' => 12115,
'weald' => 17491,
'wealth' => 2748,
'wealthier' => 15310,
'wealthiest' => 9979,
lib/Data/Password/zxcvbn/RankedDictionaries/English.pm view on Meta::CPAN
'we\'d' => 554,
'we\'ll' => 159,
'we\'re' => 77,
'we\'ve' => 226,
'weak' => 1301,
'weaken' => 7596,
'weaker' => 6329,
'weakest' => 8826,
'weakling' => 14449,
'weakness' => 2777,
'weaknesses' => 5595,
view all matches for this distribution
view release on metacpan or search on metacpan
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
view release on metacpan or search on metacpan
examples/try_me.pl view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Scalar::Util qw(weaken);
# This sample code is available to you so you
# can see Data::Printer working out of the box.
# It can be used as a quick way to test your
# color palette scheme!
examples/try_me.pl view on Meta::CPAN
class => $obj,
};
$sample->{weakref} = $sample;
weaken $sample->{weakref};
BEGIN { $ENV{DATAPRINTERRC} = '' }; # <-- skip user's .dataprinter
use DDP show_memsize => 1,
show_refcount => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Random/dict view on Meta::CPAN
ways
wayside
wayward
we
weak
weaken
weakened
weakening
weakens
weaker
weakest
weakly
weakness
weaknesses
view all matches for this distribution