Subject: | pod shows a method create but there does not seem to be one |
Is the "create" method in the pod really supposed to be create_testdata?
use strict;
use warnings;
use DBI;
use DBIx::Table::TestDataGenerator;
my $h = DBI->connect('dbi:Oracle:host=xxx;sid=xxx',
'xxx', 'xxx', {RaiseError => 1});
my $generator = DBIx::Table::TestDataGenerator->new(
dbh => $h,
table => 'market',
);
$generator->create({
target_size => 1,
num_random => 1,
seed => 1,
});
$ perl dbix_table_testdatagenerator.pl
Can't locate object method "create" via package
"DBIx::Table::TestDataGenerator" at dbix_table_testdatagenerator.pl line 13.
Also, it shows passing a hash reference but create_testdata appears to
want an even list.
use strict;
use warnings;
use DBI;
use DBIx::Table::TestDataGenerator;
my $h = DBI->connect('dbi:Oracle:host=xxx;sid=xxx',
'xxx', 'xxx', {RaiseError => 1});
my $generator = DBIx::Table::TestDataGenerator->new(
dbh => $h,
table => 'market',
);
$generator->create_testdata({
target_size => 1,
num_random => 1,
seed => 1,
}
$ perl dbix_table_testdatagenerator.pl
Reference found where even-sized list expected at
/home/martin/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/DBIx/Table/TestDataGenerator.pm
line 38.);
sub create_testdata {
my $self = shift;
my %args = @_; <--------------- here
Martin
--
Martin J. Evans
Wetherby, UK