Skip to content

Commit

Permalink
Merge pull request #2 from Dual-Life/develop
Browse files Browse the repository at this point in the history
1.52 - Update test.pl
  • Loading branch information
jdhedden committed May 16, 2016
2 parents 34bf176 + 53504ef commit b9e587d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 11 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Revision history for Perl extension threads::shared.
-
-

1.52 Mon May 16 18:46:52 2016
- Make t/test.pl compatible with Perls < 5.10 (again)

1.51 Fri Apr 22 19:05:18 2016
- Documented that 'bless' does not propagate to nested shared items.

Expand Down
1 change: 0 additions & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ WriteMakefile(
'Scalar::Util' => 0,
'threads' => 1.73,

'Test' => 0,
'Test::More' => 0,
'ExtUtils::testlib' => 0,
},
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
threads::shared version 1.51
threads::shared version 1.52
============================

This module needs Perl 5.8.0 or later compiled with USEITHREADS.
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# threads-shared
The 'threads-shared' module for Perl.
Perl extension for sharing data structures between threads.

This module is dual-lived in both the core Perl distribution and on CPAN.

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

13 changes: 9 additions & 4 deletions lib/threads/shared.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use warnings;

use Scalar::Util qw(reftype refaddr blessed);

our $VERSION = '1.51'; # Please update the pod, too.
our $VERSION = '1.52'; # Please update the pod, too.
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;

Expand Down Expand Up @@ -195,7 +195,7 @@ threads::shared - Perl extension for sharing data structures between threads
=head1 VERSION
This document describes threads::shared version 1.51
This document describes threads::shared version 1.52
=head1 SYNOPSIS
Expand Down Expand Up @@ -646,8 +646,11 @@ to: L<http://rt.cpan.org/Public/Dist/Display.html?Name=threads-shared>
=head1 SEE ALSO
L<threads::shared> Discussion Forum on CPAN:
L<http://www.cpanforum.com/dist/threads-shared>
threads::shared on MetaCPAN:
L<https://metacpan.org/release/threads-shared>
Code repository for CPAN distribution:
L<https://github.com/Dual-Life/threads-shared>
L<threads>, L<perlthrtut>
Expand All @@ -657,6 +660,8 @@ L<http://www.perl.com/pub/a/2002/09/04/threads.html>
Perl threads mailing list:
L<http://lists.perl.org/list/ithreads.html>
Sample code in the I<examples> directory of this distribution on CPAN.
=head1 AUTHOR
Artur Bergman E<lt>sky AT crucially DOT netE<gt>
Expand Down
14 changes: 10 additions & 4 deletions t/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

# NOTE:
#
# It's best to not features found only in more modern Perls here, as some cpan
# distributions copy this file and operate on older Perls. Similarly keep
# things simple as this may be run under fairly broken circumstances. For
# Do not rely on features found only in more modern Perls here, as some CPAN
# distributions copy this file and must operate on older Perls. Similarly, keep
# things, simple as this may be run under fairly broken circumstances. For
# example, increment ($x++) has a certain amount of cleverness for things like
#
# $x = 'zz';
Expand Down Expand Up @@ -284,6 +284,12 @@ sub _qq {
return defined $x ? '"' . display ($x) . '"' : 'undef';
};

# Support pre-5.10 Perls, for the benefit of CPAN dists that copy this file.
# Note that chr(90) exists in both ASCII ("Z") and EBCDIC ("!").
my $chars_template = defined(eval { pack "W*", 90 }) ? "W*" : "U*";
eval 'sub re::is_regexp { ref($_[0]) eq "Regexp" }'
if !defined &re::is_regexp;

# keys are the codes \n etc map to, values are 2 char strings such as \n
my %backslash_escape;
foreach my $x (split //, 'nrtfa\\\'"') {
Expand All @@ -296,7 +302,7 @@ sub display {
foreach my $x (@_) {
if (defined $x and not ref $x) {
my $y = '';
foreach my $c (unpack("W*", $x)) {
foreach my $c (unpack($chars_template, $x)) {
if ($c > 255) {
$y = $y . sprintf "\\x{%x}", $c;
} elsif ($backslash_escape{$c}) {
Expand Down

0 comments on commit b9e587d

Please sign in to comment.