package SugarTrail::Template::CondBlock; # condition block # init() # parse(string) # matches(data) use strict; use warnings; use SugarTrail::Template::Condition; use Data::Dumper; sub init { my $class = shift; my $self = {}; return bless $self, $class; } sub parse { my $self = shift; my $string = shift; my @parts = split ";", $string; foreach (@parts) { my $c = SugarTrail::Template::Condition->new($_); push @{$self->{conds}}, $c; } return scalar @{ $self->{conds} }; } sub match { my $self = shift; my $args = shift; } 1;