OSSP CVS Repository

ossp - Check-in [3624]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3624
Date: 2003-Sep-22 14:58:25 (local)
2003-Sep-22 12:58:25 (UTC)
User:rse
Branch:
Comment: fix obj->folder(format, pattern) implementation
Tickets:
Inspections:
Files:
ossp-pkg/string-divert/ChangeLog      1.3 -> 1.4     2 inserted, 0 deleted
ossp-pkg/string-divert/Divert.pm      1.5 -> 1.6     3 inserted, 3 deleted
ossp-pkg/string-divert/test.pl      1.2 -> 1.3     6 inserted, 1 deleted

ossp-pkg/string-divert/ChangeLog 1.3 -> 1.4

--- ChangeLog    2003/05/29 18:43:50     1.3
+++ ChangeLog    2003/09/22 12:58:25     1.4
@@ -2,6 +2,8 @@
   ChangeLog
   =========
 
+  0.93 (22-Sep-2003)
+      o fix obj->folder(format, pattern) implementation
   0.92 (29-Apr-2003)
       o fix auto-indentation generation on unfolding
       o add "storage" mode functionality


ossp-pkg/string-divert/Divert.pm 1.5 -> 1.6

--- Divert.pm    2003/05/29 18:45:49     1.5
+++ Divert.pm    2003/09/22 12:58:25     1.6
@@ -36,7 +36,7 @@
 
 require Exporter;
 
-our $VERSION   = '0.92';
+our $VERSION   = '0.93';
 
 our @ISA       = qw(Exporter);
 our @EXPORT_OK = qw(new destroy DESTROY
@@ -327,9 +327,9 @@
     if (defined($b)) {
         #   configure folder
         my $test = sprintf($a, "foo");
-        my $id = ($test =~ m|${b}()|s);
+        my ($id) = ($test =~ m|${b}()|s);
         die "folder construction format and matching regular expression do not correspond"
-            if ($id ne "foo");
+            if (not defined($id) or (defined($id) and $id ne "foo"));
         $self->{foldermk} = $a;
         $self->{folderre} = $b;
         return;


ossp-pkg/string-divert/test.pl 1.2 -> 1.3

--- test.pl      2003/05/23 11:09:57     1.2
+++ test.pl      2003/09/22 12:58:25     1.3
@@ -23,7 +23,7 @@
 ##
 
 use 5.006;
-use Test::More tests => 36;
+use Test::More tests => 37;
 
 #   test: module loading
 BEGIN { use_ok('String::Divert') };
@@ -132,3 +132,8 @@
 $x << 0;
 ok("$x" eq "foobarbazquux", "diversion");
 
+#   configuring folder patters
+$x->assign("x");
+$x->folder('{#%s#}', '\{#([a-zA-Z_][a-zA-Z0-9_.-]*)#\}');
+ok("$x" eq "x", "folder pattern 1");
+

CVSTrac 2.0.1