[Bps-public-commit] Data-ICal branch, master, updated. 0.20-4-gfe68eb3
Alex Vandiver
alexmv at bestpractical.com
Wed Jul 3 18:43:19 EDT 2013
The branch, master has been updated
via fe68eb3921e733c772974cfabcab4181aa4aa502 (commit)
via d5086b1dfbf5667d38e9de166f047a480e4aed82 (commit)
from aed1575d15a1ebea6e6e32f3b72a77a8ecaf351d (commit)
Summary of changes:
Changes | 4 ++++
META.yml | 2 +-
lib/Data/ICal.pm | 2 +-
lib/Data/ICal/Entry.pm | 4 ++--
t/12.verson1.t | 4 ++--
5 files changed, 10 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit d5086b1dfbf5667d38e9de166f047a480e4aed82
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jul 3 18:37:10 2013 -0400
Ensure that properties are iterated in a consistent order
This guarantees that any warnings are also in a predictable order; this
is necessary for tests to reliably pass under 5.18 and above, which
randomize hash ordering.
diff --git a/lib/Data/ICal/Entry.pm b/lib/Data/ICal/Entry.pm
index f7fbc24..15a7b0f 100644
--- a/lib/Data/ICal/Entry.pm
+++ b/lib/Data/ICal/Entry.pm
@@ -554,8 +554,8 @@ sub _parse_generic_event {
my ( $parent, $entry, $object ) = @_;
my $p = $object->{properties};
- while ( my ( $key, $val ) = each(%$p) ) {
- foreach my $occurence (@$val) {
+ for my $key ( sort keys %$p ) {
+ foreach my $occurence (@{ $p->{$key} }) {
my $prop;
# Unescapes, but only in v2, and not if it's explicitly not TEXT
diff --git a/t/12.verson1.t b/t/12.verson1.t
index 5430323..40a6c00 100644
--- a/t/12.verson1.t
+++ b/t/12.verson1.t
@@ -13,8 +13,8 @@ BEGIN { use_ok('Data::ICal') }
my $cal;
warnings_are { $cal = Data::ICal->new(filename => 't/ics/version1.ics') }
- [ {carped => "Unknown property for Data::ICal::Entry::Event: malarm"},
- {carped => "Unknown property for Data::ICal::Entry::Event: dcreated"} ],
+ [ {carped => "Unknown property for Data::ICal::Entry::Event: dcreated"},
+ {carped => "Unknown property for Data::ICal::Entry::Event: malarm"} ],
"Got a warning for fake property set";
ok((not $cal), "rejected calendar with version property value 1.0");
commit fe68eb3921e733c772974cfabcab4181aa4aa502
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jul 3 18:42:30 2013 -0400
Releng for 0.21
diff --git a/Changes b/Changes
index 87b15e9..9ac41b5 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
Revision history for Data-ICal
+0.21
+ * Examine properties in consistent order, so tests pass on 5.18 and
+ above
+
0.20
* Properly restrict the valid properties when iCal version 1.0
(Ashley Willis)
diff --git a/META.yml b/META.yml
index 7a4552f..a701e02 100644
--- a/META.yml
+++ b/META.yml
@@ -30,4 +30,4 @@ requires:
Text::vFile::asData: 0
resources:
license: http://dev.perl.org/licenses/
-version: 0.20
+version: 0.21
diff --git a/lib/Data/ICal.pm b/lib/Data/ICal.pm
index 564b027..dde250c 100644
--- a/lib/Data/ICal.pm
+++ b/lib/Data/ICal.pm
@@ -7,7 +7,7 @@ use base qw/Data::ICal::Entry/;
use Class::ReturnValue;
use Text::vFile::asData;
-our $VERSION = '0.20';
+our $VERSION = '0.21';
use Carp;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list