=cut
sub get_tz_offset {
- # some systmes don't handle or mishandle %z, so be creative.
+ # some systems don't handle or mishandle %z, so be creative.
my $t = shift || time;
my $gm = timegm(localtime($t));
my $sign = qw( + + - )[ $gm <=> $t ];
{
my %cquote_map = (
+ "a" => chr(7),
"b" => chr(8),
"t" => chr(9),
"n" => chr(10),
$_ = $2;
last;
}
- if (/^([\\\042btnvfr])(.*)$/) {
+ if (/^([\\\042abtnvfr])(.*)$/) {
$retval .= $cquote_map{$1};
$_ = $2;
last;
}
- # This is malformed -- just return it as-is for now.
- return $_[0];
+ # This is malformed
+ throw Error::Simple("invalid quoted path $_[0]");
}
$_ = $remainder;
}