Subject: | [PATCH] 5.11 introduces new warning on uc |
Since Data-ICal has a "Nowarnings" test, it breaks on 5.11 with this error:
t/10.mime-vcal10..........
# Failed test 'no warnings'
# at
/home/src/perl/repoperls/installed-perls/perl/pPEBaO1/perl-5.10.0@33648/lib/site_perl/5.11.0/Test/NoWarnings.pm
line 45.
# There were 3 warning(s)
# ^IPrevious test 5 'The object isa Data::ICal'
# ^IUse of uninitialized value in uc at
/home/sand/.cpan/build/Data-ICal-0.13-ohuKCr/blib/lib/Data/ICal/Property.pm
line 128.
# at
/home/sand/.cpan/build/Data-ICal-0.13-ohuKCr/blib/lib/Data/ICal/Property.pm
line 128
#
^IData::ICal::Property::decoded_value('Data::ICal::Property=HASH(0x82de620)')
called at
/home/sand/.cpan/build/Data-ICal-0.13-ohuKCr/blib/lib/Data/ICal/Property.pm
line 152
# ^IData::ICal::Property::encode('Data::ICal::Property=HASH(0x82de620)',
'QUotED-PRintabLE') called at t/10.mime-vcal10.t line 62
#
[other similar errors omitted]
Patch below fixes things.
diff -urp Data-ICal-0.13/lib/Data/ICal/Property.pm
Data-ICal-0.13-4gFJoN/lib/Data/ICal/Property.pm
--- Data-ICal-0.13/lib/Data/ICal/Property.pm 2007-01-12
19:21:32.000000000 +0100
+++ Data-ICal-0.13-4gFJoN/lib/Data/ICal/Property.pm 2008-04-06
12:15:29.000000000 +0200
@@ -125,7 +125,7 @@ the raw value.
sub decoded_value {
my $self = shift;
my $value = $self->value;
- my $encoding = uc $self->parameters->{'ENCODING'};
+ my $encoding = uc($self->parameters->{'ENCODING'}||"");
if ($ENCODINGS{$encoding}) {
return $ENCODINGS{$encoding}{'decode'}->($value);
@@ -299,7 +299,7 @@ sub _fold {
my $string = shift;
my $quoted_printable = $self->vcal10 &&
- uc $self->parameters->{'ENCODING'} eq 'QUOTED-PRINTABLE';
+ uc($self->parameters->{'ENCODING'}||"") eq 'QUOTED-PRINTABLE';
# We can't just use a s//g, because we need to include the added
space/= and
# first character of the next line in the count for the next line.
HTH,