17 |
|
|
18 |
our $VERSION = '0.01'; |
our $VERSION = '0.01'; |
19 |
|
|
20 |
#my $LOOKUP_REGEX = '\[[^\[\]]+\]'; |
=head1 SYNOPSYS |
|
#my $LOOKUP_REGEX_SAVE = '\[([^\[\]]+)\]'; |
|
|
my $LOOKUP_REGEX = 'lookup{[^\{\}]+}'; |
|
|
my $LOOKUP_REGEX_SAVE = 'lookup{([^\{\}]+)}'; |
|
21 |
|
|
22 |
|
This module defines common functions, and is used as base for other, more |
23 |
|
specific modules. |
24 |
|
|
25 |
|
my $webpac = new WebPAC::Common( |
26 |
|
filter => { |
27 |
|
'filter_name_1' => sub { |
28 |
|
# filter code |
29 |
|
return length($_); |
30 |
|
}, ... |
31 |
|
}, |
32 |
|
} |
33 |
|
|
34 |
=head1 FUNCTIONS |
=head1 FUNCTIONS |
35 |
|
|
104 |
$log->debug("filter result: $format"); |
$log->debug("filter result: $format"); |
105 |
} |
} |
106 |
# do we have lookups? |
# do we have lookups? |
107 |
if ($format =~ /$LOOKUP_REGEX/o) { |
if ($self->{'lookup'}) { |
|
$log->debug("format '$format' has lookup"); |
|
108 |
return $self->lookup($format); |
return $self->lookup($format); |
109 |
} else { |
} else { |
110 |
return $format; |
return $format; |
241 |
|
|
242 |
$webpac->_init_logger('/path/to/log.conf'); |
$webpac->_init_logger('/path/to/log.conf'); |
243 |
|
|
244 |
|
If no path to configuration file is given, dummy empty configuration |
245 |
|
will be create. |
246 |
|
|
247 |
=cut |
=cut |
248 |
|
|
249 |
sub _init_logger { |
sub _init_logger { |