Skip to content

Commit

Permalink
Merge pull request #1 from jdhedden/develop
Browse files Browse the repository at this point in the history
4.03 threads::shared::is_shared
  • Loading branch information
jdhedden authored Feb 26, 2017
2 parents 7796c34 + f7e1693 commit 69a4827
Show file tree
Hide file tree
Showing 29 changed files with 87 additions and 63 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ nytprof.out
*.o
*.bs
/_eumm/

/ARCHIVE/
/stuff/
/Notes.txt
/presentation/
6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Revision history for Perl extension Object::InsideOut.

-
-

4.03 Sun Feb 26 17:14:40 2017
- Update to use threads::shared::is_shared

4.02 Thu Aug 27 00:57:06 2015
- Remove errant debugging code - D'oh!

Expand Down
2 changes: 0 additions & 2 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,3 @@ t/Req1.pm
t/Req2.pm
t/Req3.pm
examples/YAPI.pm
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
4 changes: 2 additions & 2 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ sub postamble
{
return <<'_EXTRAS_';
fixfiles:
@dos2unix `cat MANIFEST | grep -v META`
@$(CHMOD) 644 `cat MANIFEST | grep -v META`
@dos2unix `cat MANIFEST`
@$(CHMOD) 644 `cat MANIFEST`
yapi:
$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', '\''$(PM_FILTER)'\'')' -- \
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Object-InsideOut version 4.02
Object-InsideOut version 4.03
=============================

This module provides comprehensive support for implementing classes using the
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Object-InsideOut
The 'Object-InsideOut' module for Perl.
Comprehensive inside-out object support module for Perl.

Detailed information regarding this module can be found on [MetaCPAN](https://metacpan.org/pod/Object::InsideOut).

4 changes: 2 additions & 2 deletions examples/YAPI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package Term::YAPI; {
use strict;
use warnings;

our $VERSION = '4.02';
our $VERSION = '4.03';

#####
#
Expand All @@ -22,7 +22,7 @@ package Term::YAPI; {
$threaded_okay = !$@;
}

use Object::InsideOut 4.02;
use Object::InsideOut 4.03;

# Default progress indicator is a twirling bar
my @yapi :Field
Expand Down
36 changes: 18 additions & 18 deletions lib/Bundle/Object/InsideOut.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package Bundle::Object::InsideOut;
use strict;
use warnings;

our $VERSION = '4.02';
our $VERSION = '4.03';
$VERSION = eval $VERSION;

1;
Expand All @@ -20,53 +20,53 @@ Bundle::Object::InsideOut - A bundle of modules for full Object::InsideOut suppo
=head1 CONTENTS
Test::Harness 3.35 - Used for module testing
Test::Harness 3.36 - Used for module testing
Test::Simple 1.001014 - Used for module testing
Test::Simple 1.302059 - Used for module testing
Scalar::Util 1.42 - Used by Object::InsideOut
Scalar::Util 1.47 - Used by Object::InsideOut
Pod::Escapes 1.07 - Used by Pod::Simple
Pod::Simple 3.30 - Used by Test::Pod
Pod::Simple 3.35 - Used by Test::Pod
Test::Pod 1.51 - Checks POD syntax
Devel::Symdump 2.15 - Used by Pod::Coverage
Devel::Symdump 2.18 - Used by Pod::Coverage
File::Spec 3.47 - Used by Pod::Parser
File::Spec 3.63 - Used by Pod::Parser
Pod::Parser 1.63 - Used by Pod::Coverage
Pod::Coverage 0.23 - Used by Test::Pod::Coverage
Test::Pod::Coverage 1.10 - Tests POD coverage
threads 2.02 - Support for threads
threads 2.12 - Support for threads
threads::shared 1.48 - Support for sharing objects between threads
threads::shared 1.54 - Support for sharing objects between threads
Want 0.25 - :lvalue accessor support
Want 0.29 - :lvalue accessor support
Data::Dumper 2.154 - Object serialization support
Data::Dumper 2.161 - Object serialization support
Storable 2.51 - Object serialization support
Storable 2.56 - Object serialization support
Devel::StackTrace 2.00 - Used by Exception::Class
Devel::StackTrace 2.02 - Used by Exception::Class
Class::Data::Inheritable 0.08 - Used by Exception::Class
Exception::Class 1.39 - Error handling
Exception::Class 1.42 - Error handling
Object::InsideOut 4.02 - Inside-out object support
Object::InsideOut 4.03 - Inside-out object support
URI 1.69 - Used by LWP::UserAgent
URI 1.71 - Used by LWP::UserAgent
HTML::Tagset 3.20 - Used by LWP::UserAgent
HTML::Parser 3.71 - Used by LWP::UserAgent
HTML::Parser 3.72 - Used by LWP::UserAgent
LWP::UserAgent 6.13 - Used by Math::Random::MT::Auto
LWP::UserAgent 6.21 - Used by Math::Random::MT::Auto
Win32::API 0.82 - Used by Math::Random::MT::Auto (Win XP only)
Expand Down
14 changes: 7 additions & 7 deletions lib/Object/InsideOut.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ require 5.006;
use strict;
use warnings;

our $VERSION = '4.02';
our $VERSION = '4.03';
$VERSION = eval $VERSION;

use Object::InsideOut::Exception 4.02;
use Object::InsideOut::Util 4.02 qw(create_object hash_re is_it make_shared);
use Object::InsideOut::Metadata 4.02;
use Object::InsideOut::Exception 4.03;
use Object::InsideOut::Util 4.03 qw(create_object hash_re is_it make_shared);
use Object::InsideOut::Metadata 4.03;

require B;

Expand Down Expand Up @@ -1126,7 +1126,7 @@ sub process_fields :Sub(Private)
}

# Share the field, if applicable
if (is_sharing($pkg) && !threads::shared::_id($fld)) {
if (is_sharing($pkg) && !threads::shared::is_shared($fld)) {
# Preserve any contents
my $contents = Object::InsideOut::Util::clone_shared($fld);

Expand Down Expand Up @@ -1895,7 +1895,7 @@ sub set
}

# Handle sharing
if ($GBL{'share'}{'ok'} && threads::shared::_id($field)) {
if ($GBL{'share'}{'ok'} && threads::shared::is_shared($field)) {
lock($field);
if ($fld_type eq 'HASH') {
$$field{$$self} = make_shared($data);
Expand Down Expand Up @@ -1963,7 +1963,7 @@ sub DESTROY
} elsif (exists($GBL{'share'}{'obj'})) {
my $so_cl = $GBL{'share'}{'obj'}{$class};
if (! exists($$so_cl{$$self})) {
# This can happen when an non-shared object
# This can happen when a non-shared object
# is returned from a thread
warn("ERROR: Attempt to DESTROY object ID $$self of class $class in thread ID $tid twice\n");
return;
Expand Down
11 changes: 8 additions & 3 deletions lib/Object/InsideOut.pod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Object::InsideOut - Comprehensive inside-out object support module

=head1 VERSION

This document describes Object::InsideOut version 4.02
This document describes Object::InsideOut version 4.03

=head1 SYNOPSIS

Expand Down Expand Up @@ -3570,8 +3570,11 @@ needed for full support of all of the features provided by Object::InsideOut.

=head1 SEE ALSO

Object::InsideOut Discussion Forum on CPAN:
L<http://www.cpanforum.com/dist/Object-InsideOut>
L<Object::InsideOut> on MetaCPAN:
L<https://metacpan.org/release/Object-InsideOut>

Code repository:
L<https://github.com/jdhedden/Object-InsideOut>

Inside-out Object Model:
L<http://www.perlfoundation.org/perl5/index.cgi?inside_out_object>,
Expand All @@ -3585,6 +3588,8 @@ L<Object::InsideOut::Metadata>
L<Storable>, L<Exception:Class>, L<Want>, L<Math::Random::MT::Auto>,
L<attributes>, L<overload>

Sample code in the I<examples> directory of this distribution on CPAN.

=head1 ACKNOWLEDGEMENTS

Abigail S<E<lt>perl AT abigail DOT nlE<gt>> for inside-out objects in general.
Expand Down
2 changes: 1 addition & 1 deletion lib/Object/InsideOut/Autoload.pm
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ sub AUTOLOAD


# Ensure correct versioning
($Object::InsideOut::VERSION eq '4.02')
($Object::InsideOut::VERSION eq '4.03')
or die("Version mismatch\n");

# EOF
2 changes: 1 addition & 1 deletion lib/Object/InsideOut/Chained.pm
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ sub create_CHAINED :Sub(Private)


# Ensure correct versioning
($Object::InsideOut::VERSION eq '4.02')
($Object::InsideOut::VERSION eq '4.03')
or die("Version mismatch\n");

# EOF
8 changes: 4 additions & 4 deletions lib/Object/InsideOut/Cumulative.pm
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ package Object::InsideOut::Results; {
use strict;
use warnings;

our $VERSION = '4.02';
our $VERSION = '4.03';
$VERSION = eval $VERSION;

use Object::InsideOut 4.02;
use Object::InsideOut::Metadata 4.02;
use Object::InsideOut 4.03;
use Object::InsideOut::Metadata 4.03;

my @VALUES :Field :Arg(VALUES);
my @CLASSES :Field :Arg(CLASSES);
Expand Down Expand Up @@ -260,7 +260,7 @@ add_meta('Object::InsideOut::Results', {


# Ensure correct versioning
($Object::InsideOut::VERSION eq '4.02')
($Object::InsideOut::VERSION eq '4.03')
or die("Version mismatch\n");

# EOF
2 changes: 1 addition & 1 deletion lib/Object/InsideOut/Dump.pm
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ sub dump


# Ensure correct versioning
($Object::InsideOut::VERSION eq '4.02')
($Object::InsideOut::VERSION eq '4.03')
or die("Version mismatch\n");

# EOF
2 changes: 1 addition & 1 deletion lib/Object/InsideOut/Dynamic.pm
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ sub create_field


# Ensure correct versioning
($Object::InsideOut::VERSION eq '4.02')
($Object::InsideOut::VERSION eq '4.03')
or die("Version mismatch\n");

# EOF
2 changes: 1 addition & 1 deletion lib/Object/InsideOut/Exception.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package Object::InsideOut::Exception; {
use strict;
use warnings;

our $VERSION = '4.02';
our $VERSION = '4.03';
$VERSION = eval $VERSION;

# Exceptions generated by this module
Expand Down
2 changes: 1 addition & 1 deletion lib/Object/InsideOut/Foreign.pm
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ sub inherit


# Ensure correct versioning
($Object::InsideOut::VERSION eq '4.02')
($Object::InsideOut::VERSION eq '4.03')
or die("Version mismatch\n");

# EOF
6 changes: 3 additions & 3 deletions lib/Object/InsideOut/Metadata.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package Object::InsideOut::Metadata; {
use strict;
use warnings;

our $VERSION = '4.02';
our $VERSION = '4.03';
$VERSION = eval $VERSION;

# Stores method metadata
Expand Down Expand Up @@ -99,7 +99,7 @@ __DATA__
### Object Interface ###
use Object::InsideOut 4.02;
use Object::InsideOut 4.03;
my @CLASSES :Field;
my @FOREIGN :Field;
Expand Down Expand Up @@ -268,7 +268,7 @@ Object::InsideOut::Metadata - Introspection for Object::InsideOut classes
=head1 VERSION
This document describes Object::InsideOut::Metadata version 4.02
This document describes Object::InsideOut::Metadata version 4.03
=head1 SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion lib/Object/InsideOut/Overload.pm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ sub generate_OVERLOAD :Sub(Private)


# Ensure correct versioning
($Object::InsideOut::VERSION eq '4.02')
($Object::InsideOut::VERSION eq '4.03')
or die("Version mismatch\n");

# EOF
4 changes: 2 additions & 2 deletions lib/Object/InsideOut/Secure.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package Object::InsideOut::Secure; {
use strict;
use warnings;

our $VERSION = '4.02';
our $VERSION = '4.03';
$VERSION = eval $VERSION;

use Object::InsideOut 4.02 ':hash_only';
use Object::InsideOut 4.03 ':hash_only';

# Holds used IDs
my %used :Field = ( 0 => undef );
Expand Down
2 changes: 1 addition & 1 deletion lib/Object/InsideOut/Universal.pm
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ sub install_UNIVERSAL


# Ensure correct versioning
($Object::InsideOut::VERSION eq '4.02')
($Object::InsideOut::VERSION eq '4.03')
or die("Version mismatch\n");

# EOF
6 changes: 3 additions & 3 deletions lib/Object/InsideOut/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ require 5.006;
use strict;
use warnings;

our $VERSION = '4.02';
our $VERSION = '4.03';
$VERSION = eval $VERSION;

use Object::InsideOut::Metadata 4.02;
use Object::InsideOut::Metadata 4.03;

### Module Initialization ###

Expand Down Expand Up @@ -111,7 +111,7 @@ sub make_shared
if (! ref($in) ||
! $threads::threads ||
! $threads::shared::threads_shared ||
threads::shared::_id($in))
threads::shared::is_shared($in))
{
return ($in);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Object/InsideOut/attributes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ sub FETCH_CODE_ATTRIBUTES :Sub { return (FETCH_ATTRS('CODE', @_)); }


# Ensure correct versioning
($Object::InsideOut::VERSION eq '4.02')
($Object::InsideOut::VERSION eq '4.03')
or die("Version mismatch\n");

# EOF
Loading

0 comments on commit 69a4827

Please sign in to comment.