[Bps-public-commit] r10867 - in Net-IMAP-Server: lib/Net/IMAP/Server

alexmv at bestpractical.com alexmv at bestpractical.com
Fri Feb 15 15:33:12 EST 2008


Author: alexmv
Date: Fri Feb 15 15:33:08 2008
New Revision: 10867

Modified:
   Net-IMAP-Server/   (props changed)
   Net-IMAP-Server/lib/Net/IMAP/Server/Command.pm
   Net-IMAP-Server/lib/Net/IMAP/Server/DefaultModel.pm

Log:
 r27930 at zoq-fot-pik:  chmrr | 2008-02-15 15:32:09 -0500
  * Support escaping in STRINGs


Modified: Net-IMAP-Server/lib/Net/IMAP/Server/Command.pm
==============================================================================
--- Net-IMAP-Server/lib/Net/IMAP/Server/Command.pm	(original)
+++ Net-IMAP-Server/lib/Net/IMAP/Server/Command.pm	Fri Feb 15 15:33:08 2008
@@ -5,7 +5,7 @@
 use bytes;
 
 use base 'Class::Accessor';
-use Regexp::Common qw/delimited/;
+use Regexp::Common qw/delimited balanced/;
 __PACKAGE__->mk_accessors(
     qw(server connection command_id options_str command _parsed_options _literals _pending_literal)
 );
@@ -141,12 +141,14 @@
     for my $term (
         grep {/\S/}
         split
-        /($RE{delimited}{-delim=>'"'}|$RE{balanced}{-parens=>'()'}|\S+$RE{balanced}{-parens=>'()[]<>'}|\S+)/,
+        /($RE{delimited}{-delim=>'"'}{-esc=>'\\'}|$RE{balanced}{-parens=>'()'}|\S+$RE{balanced}{-parens=>'()[]<>'}|\S+)/,
         defined $str ? $str : $self->options_str
         )
     {
-        if ( $term =~ /^$RE{delimited}{-delim=>'"'}{-keep}$/ ) {
-            push @parsed, $3;
+        if ( $term =~ /^$RE{delimited}{-delim=>'"'}{-esc=>'\\'}{-keep}$/ ) {
+            my $value = $3;
+            $value =~ s/\\([\\"])/$1/g;
+            push @parsed, $value;
         } elsif ( $term =~ /^$RE{balanced}{-parens=>'()'}$/ ) {
             $term =~ s/^\((.*)\)$/$1/;
             push @parsed, [ $self->parse_options($term) ];

Modified: Net-IMAP-Server/lib/Net/IMAP/Server/DefaultModel.pm
==============================================================================
--- Net-IMAP-Server/lib/Net/IMAP/Server/DefaultModel.pm	(original)
+++ Net-IMAP-Server/lib/Net/IMAP/Server/DefaultModel.pm	Fri Feb 15 15:33:08 2008
@@ -6,6 +6,8 @@
 use base 'Class::Accessor';
 __PACKAGE__->mk_accessors(qw(auth root));
 
+use Net::IMAP::Server::Mailbox;
+
 my %roots;
 
 =head1 NAME



More information about the Bps-public-commit mailing list