Acme-DateTime-Duration-Numeric
view release on metacpan or search on metacpan
Revision history for Perl extension Acme::DateTime::Duration::Numeric
0.03 Tue Jan 15 17:45:46 PST 2008
- reborn as autobox::DateTime::Duration
0.02 Tue Jan 15 17:15:39 PST 2008
- Added DateTime and DateTime::Duration dependencies
0.01 Tue Jan 15 01:36:17 2008
- original version
inc/Test/Base.pm view on Meta::CPAN
? (@list)
: $list[0];
};
}
block_accessor 'name';
block_accessor 'description';
Spiffy::field 'seq_num';
Spiffy::field 'is_filtered';
Spiffy::field 'blocks_object';
Spiffy::field 'original_values' => {};
sub set_value {
no strict 'refs';
my $accessor = shift;
block_accessor $accessor
unless defined &$accessor;
$self->{$accessor} = [@_];
}
sub run_filters {
my $map = $self->_section_map;
my $order = $self->_section_order;
Carp::croak "Attempt to filter a block twice"
if $self->is_filtered;
for my $type (@$order) {
my $filters = $map->{$type}{filters};
my @value = $self->$type;
$self->original_values->{$type} = $value[0];
for my $filter ($self->_get_filters($type, $filters)) {
$Test::Base::Filter::arguments =
$filter =~ s/=(.*)$// ? $1 : undef;
my $function = "main::$filter";
no strict 'refs';
if (defined &$function) {
$_ = join '', @value;
@value = &$function(@value);
if (not(@value) or
@value == 1 and $value[0] =~ /\A(\d+|)\z/
( run in 0.225 second using v1.01-cache-2.11-cpan-1c8d708658b )