Skip Menu |

This queue is for tickets about the DBIx-Table-TestDataGenerator CPAN distribution.

Report information
The Basics
Id: 81689
Status: resolved
Priority: 0/
Queue: DBIx-Table-TestDataGenerator

People
Owner: JDS [...] cpan.org
Requestors: bohica [...] ntlworld.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.001
Fixed in: (no value)



Subject: schema may be omitted but is refenced in the code
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 => 'xxx', ); $generator->create_testdata( target_size => 9, num_random => 2, seed => 1, ); $ perl dbix_table_testdatagenerator.pl Use of uninitialized value in uc at /home/martin/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/DBIx/Table/TestDataGenerator/TableProbe/Oracle.pm line 94. sub unique_columns_with_max { my ( $self, $get_pkey_columns ) = @_; my $sql; my $table_name = uc $self->table; my $schema = uc $self->schema; <------------ here You don't really have a schema in Oracle so I omitted it and nothing complained until the error above. Martin -- Martin J. Evans Wetherby, UK
Show quoted text
> sub unique_columns_with_max { > my ( $self, $get_pkey_columns ) = @_; > > my $sql; > my $table_name = uc $self->table; > my $schema = uc $self->schema; <------------ here > > You don't really have a schema in Oracle so I omitted it and nothing > complained until the error above.
In the next version, for Oracle you don't need to pass a schema. It will be determined in Oracle.pm by using DBIx::Admin::TableInfo. It is needed since there are some queries against catalog tables and for those queries a table owner, i.e. schema is needed.
Database schema argument was declared optional, but in fact was needed, resulting in an error. Now it does not have to be provided any more.