split_rec_on
get set
+ count
/;
use warnings;
=head1 VERSION
-Version 0.25
+Version 0.26
=cut
-our $VERSION = '0.25';
+our $VERSION = '0.26';
=head1 SYNOPSIS
return $v;
}
+=head2 count
+
+ if ( count( @result ) == 1 ) {
+ # do something if only 1 result is there
+ }
+
+=cut
+
+sub count {
+ warn "## count ",dump(@_),$/;
+ return @_ . '';
+}
# END
1;
use strict;
-use Test::More tests => 311;
+use Test::More tests => 322;
use Test::Exception;
use Cwd qw/abs_path/;
use blib;
cmp_ok( join('', suffix('xy', 'cd') ), 'eq', 'cdxy', 'suffix');
cmp_ok( join('', surround('->', '<-', 'a','b','c') ), 'eq', '->a<-->b<-->c<-', 'surround');
+ # count
+ my @el;
+ for my $i ( 0 .. 10 ) {
+ cmp_ok( count( @el ), '==', $i, "count($i)");
+ push @el, "element $i";
+ }
+
# lookups
throws_ok { _set_load_row() } qr/CODE/, 'empty _set_load_row()';