[Bps-public-commit] Data-ICal branch, master, updated. 0.22-4-gba6c89b
? sunnavy
sunnavy at bestpractical.com
Wed Aug 14 12:31:23 EDT 2019
The branch, master has been updated
via ba6c89b752109b08a46da6ea64982f1abef89223 (commit)
via fdcc86df55e478e8a762720da29cd968384a9dff (commit)
via e8e5f3ced48d5dbfbc28eb490d1feb878440dbdd (commit)
via e672390a494a976306d6bdee1386df7758375377 (commit)
from f8df6b71dbef08a10db76c085bd9ae90ce6730a9 (commit)
Summary of changes:
Changes | 10 ++++++++++
META.yml | 4 ++--
inc/Module/AutoInstall.pm | 4 ++--
inc/Module/Install.pm | 35 ++++++-----------------------------
inc/Module/Install/AutoInstall.pm | 2 +-
inc/Module/Install/Base.pm | 2 +-
inc/Module/Install/Can.pm | 13 +++++++++++--
inc/Module/Install/Fetch.pm | 2 +-
inc/Module/Install/Include.pm | 2 +-
inc/Module/Install/Makefile.pm | 2 +-
inc/Module/Install/Metadata.pm | 2 +-
inc/Module/Install/Win32.pm | 2 +-
inc/Module/Install/WriteAll.pm | 2 +-
lib/Data/ICal.pm | 2 +-
lib/Data/ICal/Property.pm | 19 +++++++++++--------
t/02.linewrap.t | 15 ++++++++++++++-
16 files changed, 65 insertions(+), 53 deletions(-)
- Log -----------------------------------------------------------------
commit e672390a494a976306d6bdee1386df7758375377
Author: Ricardo Signes <rjbs at cpan.org>
Date: Tue Aug 13 11:01:28 2019 -0400
linewrap tests: add a stronger assertion about expectation
diff --git a/t/02.linewrap.t b/t/02.linewrap.t
index 4f657c4..ed28ea0 100644
--- a/t/02.linewrap.t
+++ b/t/02.linewrap.t
@@ -3,7 +3,7 @@
use warnings;
use strict;
-use Test::More tests => 7;
+use Test::More tests => 8;
use Test::LongString;
BEGIN { use_ok('Data::ICal::Entry::Todo') }
@@ -21,5 +21,18 @@ $todo->add_property(summary => $hundreds_of_characters);
lacks_string($todo->as_string, $hundreds_of_characters, "the long string isn't there");
unlike_string($todo->as_string, qr/[^\r\n]{76}/, "no lines are too long");
+my $want = <<'END';
+BEGIN:VTODO
+SUMMARY:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ XXXXXXXXXXX
+END:VTODO
+END
+
+$want =~ s/\n/\r\n/g;
+
+is($todo->as_string, $want, "expectations: met");
like_string($todo->as_string(fold => 0), qr/.{300}/, "no lines are too long".$todo->as_string(fold=>0));
commit e8e5f3ced48d5dbfbc28eb490d1feb878440dbdd
Author: Calvin Morrison <calvin at fastmailteam.com>
Date: Tue Aug 13 11:01:58 2019 -0400
rewrite property folding to be faster (and clearer)
diff --git a/lib/Data/ICal/Property.pm b/lib/Data/ICal/Property.pm
index 1617927..6acfd6a 100644
--- a/lib/Data/ICal/Property.pm
+++ b/lib/Data/ICal/Property.pm
@@ -326,15 +326,18 @@ sub _fold {
# But some interop tests suggest it's wiser just to not fold for vcal 1.0
# at all (in quoted-printable).
} else {
- my $pos = 0;
-
- # Walk through the value, looking to replace 75 characters at
- # a time. We assign to pos() to update where to pick up for
- # the next match.
- while ( $string =~ s/\G(.{75})(?=.)/$1$crlf / ) {
- $pos += 75 + length($crlf);
- pos($string) = $pos;
+ return $string unless length $string > 75;
+
+ $string =~ s{$crlf\z}{};
+
+ my $out = substr($string, 0, 75, "") . $crlf;
+
+ while (length $string) {
+ my $substr = substr $string, 0, 74, "";
+ $out .= " $substr$crlf";
}
+
+ return $out;
}
return $string;
commit fdcc86df55e478e8a762720da29cd968384a9dff
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Aug 15 00:06:04 2019 +0800
Bump M:I to 0.19
diff --git a/META.yml b/META.yml
index cee50b6..66e7ee1 100644
--- a/META.yml
+++ b/META.yml
@@ -12,7 +12,7 @@ configure_requires:
ExtUtils::MakeMaker: 6.36
distribution_type: module
dynamic_config: 1
-generated_by: 'Module::Install version 1.14'
+generated_by: 'Module::Install version 1.19'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
diff --git a/inc/Module/AutoInstall.pm b/inc/Module/AutoInstall.pm
index cd93d14..8852e0b 100644
--- a/inc/Module/AutoInstall.pm
+++ b/inc/Module/AutoInstall.pm
@@ -8,7 +8,7 @@ use ExtUtils::MakeMaker ();
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.14';
+ $VERSION = '1.19';
}
# special map on pre-defined feature sets
@@ -537,7 +537,7 @@ sub _install_cpan {
while ( my ( $opt, $arg ) = splice( @config, 0, 2 ) ) {
( $args{$opt} = $arg, next )
if $opt =~ /^(?:force|notest)$/; # pseudo-option
- $CPAN::Config->{$opt} = $arg;
+ $CPAN::Config->{$opt} = $opt eq 'urllist' ? [$arg] : $arg;
}
if ($args{notest} && (not CPAN::Shell->can('notest'))) {
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index ff767fa..7ba98c2 100644
--- a/inc/Module/Install.pm
+++ b/inc/Module/Install.pm
@@ -31,7 +31,7 @@ BEGIN {
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '1.14';
+ $VERSION = '1.19';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -244,6 +244,8 @@ sub new {
}
return $args{_self} if $args{_self};
+ $base_path = VMS::Filespec::unixify($base_path) if $^O eq 'VMS';
+
$args{dispatch} ||= 'Admin';
$args{prefix} ||= 'inc';
$args{author} ||= ($^O eq 'VMS' ? '_author' : '.author');
@@ -322,7 +324,7 @@ sub find_extensions {
my ($self, $path) = @_;
my @found;
- File::Find::find( sub {
+ File::Find::find( {no_chdir => 1, wanted => sub {
my $file = $File::Find::name;
return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is;
my $subpath = $1;
@@ -336,7 +338,7 @@ sub find_extensions {
# correctly. Otherwise, root through the file to locate the case-preserved
# version of the package name.
if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
- my $content = Module::Install::_read($subpath . '.pm');
+ my $content = Module::Install::_read($File::Find::name);
my $in_pod = 0;
foreach ( split /\n/, $content ) {
$in_pod = 1 if /^=\w/;
@@ -351,7 +353,7 @@ sub find_extensions {
}
push @found, [ $file, $pkg ];
- }, $path ) if -d $path;
+ }}, $path ) if -d $path;
@found;
}
@@ -373,8 +375,6 @@ sub _caller {
return $call;
}
-# Done in evals to avoid confusing Perl::MinimumVersion
-eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _read {
local *FH;
open( FH, '<', $_[0] ) or die "open($_[0]): $!";
@@ -383,16 +383,6 @@ sub _read {
close FH or die "close($_[0]): $!";
return $string;
}
-END_NEW
-sub _read {
- local *FH;
- open( FH, "< $_[0]" ) or die "open($_[0]): $!";
- binmode FH;
- my $string = do { local $/; <FH> };
- close FH or die "close($_[0]): $!";
- return $string;
-}
-END_OLD
sub _readperl {
my $string = Module::Install::_read($_[0]);
@@ -413,8 +403,6 @@ sub _readpod {
return $string;
}
-# Done in evals to avoid confusing Perl::MinimumVersion
-eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _write {
local *FH;
open( FH, '>', $_[0] ) or die "open($_[0]): $!";
@@ -424,17 +412,6 @@ sub _write {
}
close FH or die "close($_[0]): $!";
}
-END_NEW
-sub _write {
- local *FH;
- open( FH, "> $_[0]" ) or die "open($_[0]): $!";
- binmode FH;
- foreach ( 1 .. $#_ ) {
- print FH $_[$_] or die "print($_[0]): $!";
- }
- close FH or die "close($_[0]): $!";
-}
-END_OLD
# _version is for processing module versions (eg, 1.03_05) not
# Perl versions (eg, 5.8.1).
diff --git a/inc/Module/Install/AutoInstall.pm b/inc/Module/Install/AutoInstall.pm
index 475303e..0e3dada 100644
--- a/inc/Module/Install/AutoInstall.pm
+++ b/inc/Module/Install/AutoInstall.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.14';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index 4206347..9fa42c2 100644
--- a/inc/Module/Install/Base.pm
+++ b/inc/Module/Install/Base.pm
@@ -4,7 +4,7 @@ package Module::Install::Base;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.14';
+ $VERSION = '1.19';
}
# Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index 9929b1b..d65c753 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -8,7 +8,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.14';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -121,6 +121,15 @@ END_C
# Can we locate a (the) C compiler
sub can_cc {
my $self = shift;
+
+ if ($^O eq 'VMS') {
+ require ExtUtils::CBuilder;
+ my $builder = ExtUtils::CBuilder->new(
+ quiet => 1,
+ );
+ return $builder->have_compiler;
+ }
+
my @chunks = split(/ /, $Config::Config{cc}) or return;
# $Config{cc} may contain args; try to find out the program part
@@ -151,4 +160,4 @@ if ( $^O eq 'cygwin' ) {
__END__
-#line 236
+#line 245
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index 3d8de76..3072b08 100644
--- a/inc/Module/Install/Fetch.pm
+++ b/inc/Module/Install/Fetch.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.14';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Include.pm b/inc/Module/Install/Include.pm
index f274f87..13fdcd0 100644
--- a/inc/Module/Install/Include.pm
+++ b/inc/Module/Install/Include.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.14';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index 66993af..13a4464 100644
--- a/inc/Module/Install/Makefile.pm
+++ b/inc/Module/Install/Makefile.pm
@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.14';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index e547fa0..11bf971 100644
--- a/inc/Module/Install/Metadata.pm
+++ b/inc/Module/Install/Metadata.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.14';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index 9706e5f..f7aa615 100644
--- a/inc/Module/Install/Win32.pm
+++ b/inc/Module/Install/Win32.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.14';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index dbedc00..2db861a 100644
--- a/inc/Module/Install/WriteAll.pm
+++ b/inc/Module/Install/WriteAll.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.14';
+ $VERSION = '1.19';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
commit ba6c89b752109b08a46da6ea64982f1abef89223
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Aug 15 00:15:06 2019 +0800
Release 0.23
diff --git a/Changes b/Changes
index 7813dd9..0440729 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,15 @@
Revision history for Data-ICal
+0.23 2019-08-14
+
+ - Rewrite property folding to be faster (and clearer)(thanks to Calvin Morrison)
+ - Linewrap tests: add a stronger assertion about expectation(thanks to Ricardo Signes)
+
+Note that as the folding code is rewritten, there is a tiny behavior change:
+Long folded strings will always contain CRLF at the end no matter if
+original strings have that or not(they should have according to RFC).
+Please report if this is an issue to you.
+
0.22 2015-02-17
- Add URI and NONE alarm types, for compatibility with Apple iCal
- Add support for the common X-WR-CalName property
diff --git a/META.yml b/META.yml
index 66e7ee1..6d1c473 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.22'
+version: '0.23'
diff --git a/lib/Data/ICal.pm b/lib/Data/ICal.pm
index 1445688..5ad188e 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.22';
+our $VERSION = '0.23';
use Carp;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list