in reply to Problem using Test::Data
The problem is that Test::Data is built on top of Test::Builder, rather than the older Test module. The plan emitted by Test isn't picked up by Test::Builder hence the error.
I'd recommend dumping Test and using Test::Simple and Test::More instead.
Also you've forgot to quote some of your barewords, and the [ NAME ] syntax is just a notation used in the Test::Data::Array documentation to indicate an optional third argument.
Putting all of this together gives us:
#!/usr/bin/perl -w use strict; use Test::Simple tests => 2; use Test::Data qw(Array); my @arr = qw( roop ras dar ); my $a = 'dar'; array_any_ok( $a, @arr, '$a is in @arr' ); array_empty_ok( @arr, '@arr is empty' );
|
|---|