Browse Source

Added regex handler to Condition

Alois Mahdal (@azzgoat) 12 years ago
parent
commit
2d0d16bd27
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      lib/SugarTrail/Template/Condition.pm

+ 6
- 0
lib/SugarTrail/Template/Condition.pm View File

13
     return $a eq $b;
13
     return $a eq $b;
14
 }
14
 }
15
 
15
 
16
+sub _regex {
17
+    my $a = shift;
18
+    my $b = $_[0]->[0];
19
+    return $a =~ m/$b/;
20
+}
21
+
16
 sub new {
22
 sub new {
17
     my $class   = shift;
23
     my $class   = shift;
18
     my $self    = {};
24
     my $self    = {};