Subject: | PATCH: squelch warnings. |
This patch addresses a number of warnings that can come about when there
are undefined values being passed around.
Subject: | warnings.patch |
--- old-mark/perllib/Data/ICal/Property.pm 2006-01-20 16:37:04.000000000 -0500
+++ new-mark-2/perllib/Data/ICal/Property.pm 2006-02-14 11:10:57.000000000 -0500
@@ -75,6 +75,8 @@
sub as_string {
my $self = shift;
+ # squelch warnings like: Use of uninitialized value in concatenation
+ no warnings;
my $string = uc( $self->key )
. $self->_parameters_as_string . ":"
. $self->_value_as_string . "\n";
@@ -100,6 +102,7 @@
sub _value_as_string {
my $self = shift;
my $value = $self->value();
+ return undef unless defined $value;
$value =~ s/\\/\\/gs;
$value =~ s/\Q;/\\;/gs;