Commits

Toby Inkster committed 65e6ff6

Perl 5.8 compat

  • Participants
  • Parent commits 98f7a32
  • Tags 0.002

Comments (0)

Files changed (5)

 use inc::Module::Package 'RDF:tobyink 0.009';
 
+dynamic_config;
+requires('UNIVERSAL::DOES', 0) if $] < 5.010;

lib/JSON/MultiValueOrdered.pm

 use 5.008;
 use strict;
 use warnings;
+use if $] < 5.010, 'UNIVERSAL::DOES';
 
 {
 	package JSON::MultiValueOrdered;
 	
 	our $AUTHORITY = 'cpan:TOBYINK';
-	our $VERSION   = '0.001';
+	our $VERSION   = '0.002';
 	
 	use base qw(JSON::Tiny::Subclassable);
 	

lib/JSON/Tiny/Subclassable.pm

 	package JSON::Tiny::Subclassable;
 
 	our $AUTHORITY = 'cpan:TOBYINK';
-	our $VERSION   = '0.001';
+	our $VERSION   = '0.002';
 
 	our @ISA = qw(JSON::Tiny);
 	
 		'u2029' => "\x{2029}"
 	);
 	my %REVERSE = map { $ESCAPE{$_} => "\\$_" } keys %ESCAPE;
-	for (0x00 .. 0x1F, 0x7F) { $REVERSE{pack 'C', $_} //= sprintf '\u%.4X', $_ }
+	for (0x00 .. 0x1F, 0x7F) {
+		my $k = pack 'C', $_;
+		$REVERSE{$k} = sprintf '\u%.4X', $_ unless defined $REVERSE{$k};
+	}
 	
 	# Unicode encoding detection
 	my $UTF_PATTERNS = {

lib/Tie/Hash/MultiValueOrdered.pm

 	package Tie::Hash::MultiValueOrdered;
 	
 	our $AUTHORITY = 'cpan:TOBYINK';
-	our $VERSION   = '0.001';
+	our $VERSION   = '0.002';
 	
 	use constant {
 		IDX_DATA  => 0,

meta/changes.pret

 	issued  2012-11-08;
 	label   "Initial release".
 
+`JSON-MultiValueOrdered 0.002 cpan:TOBYINK`
+	issued  2012-11-11;
+	label   "Perl 5.8 compatibility release";
+	changeset [
+		item "Require UNIVERSAL::DOES on Perl 5.8."^^Change;
+		item "Avoid defined-or operator."^^Change;
+	].