autodia for sql: error in Diagram.pm



Hi,
Got the following error with Autodia while parsing an sql file:
"Can't use an undefined value as an ARRAY reference at /usr/share/perl5/Autodia/Diagram.pm line 1055."
Would anybody have a suggestion?
TIA, Gregoire

PS: please find below the context and the content of /usr/share/perl5/Autodia/Diagram.pm


################
$ more test.sql
CREATE TABLE `animal` (
`animaluid` int(10) unsigned NOT NULL auto_increment,
`animalname` varchar(100) NOT NULL default '',
PRIMARY KEY  (`animaluid`)
) ;

$ autodia.pl -l sql -i MasterMind_peptides.sql.2
getting pattern for sql

AutoDia - version 2.00(c) Copyright 2003 A Trevena

getting handlers..
using language : sql

..using Autodia::Handler::SQL
opening MasterMind_peptides.sql.2
line : CREATE TABLE `animal` (

found new table :
found non-table line
checking line :   `animaluid` int(10) unsigned NOT NULL auto_increment,
against pattern : float|long|curr|double
checking line :   `animaluid` int(10) unsigned NOT NULL auto_increment,
against pattern : integer|longint|shortint|int|bigint|tinyint
matched field
field: `animaluid`, field_type : int
found non-table line
checking line :   `animalname` varchar(100) NOT NULL default '',
against pattern : float|long|curr|double
checking line :   `animalname` varchar(100) NOT NULL default '',
against pattern : integer|longint|shortint|int|bigint|tinyint
checking line :   `animalname` varchar(100) NOT NULL default '',
against pattern : date|datetime|smalldate|smalldatetime|time
checking line :   `animalname` varchar(100) NOT NULL default '',
against pattern : text|ntext
checking line :   `animalname` varchar(100) NOT NULL default '',
against pattern : varchar|varchar2|nvarchar
matched field
field: `animalname`, field_type : varchar
found non-table line
checking line :   PRIMARY KEY  (`animaluid`)
against pattern : float|long|curr|double
checking line :   PRIMARY KEY  (`animaluid`)
against pattern : integer|longint|shortint|int|bigint|tinyint
checking line :   PRIMARY KEY  (`animaluid`)
against pattern : date|datetime|smalldate|smalldatetime|time
checking line :   PRIMARY KEY  (`animaluid`)
against pattern : text|ntext
checking line :   PRIMARY KEY  (`animaluid`)
against pattern : varchar|varchar2|nvarchar
checking for PK
found PK
skipping..
skipping..
skipping..
output filename : autodia.out.xml
get_template called : outfile -- autodia.out.xml
gday rocked the London Underground subway network, prompting its closure. Travelers emerged from tunnels covered in blood and soot. A blast also hit at least one bus, witnesses said. Scotland Yard reported multiple explosions across the city. The cause of the blastsetting default (dia) template
template : SCALAR(0x8447014)
Diagram.pm : Inheritances : no Inheritances to be printed - ignoring..
Diagram.pm : Dependancies : no dependancies to be printed - ignoring..
Can't use an undefined value as an ARRAY reference at /usr/share/perl5/Autodia/Diagram.pm line 1055.
#################
The content of /usr/share/perl5/Autodia/Diagram.pm:
....
    $nodes{$node}{xx} = $x;
    $nodes{$node}{yy} = $y;
    $nodes{$node}{entity}->set_location($x,$y);
if (scalar @{$nodes{$node}{children}} && ( scalar @{$rows[1]} > 0)) { #### line 1055
        my @sorted_children = sort {
            $nodes{$b}{weight} <=> $nodes{$a}{weight}
        } @{$nodes{$node}{children}};
        unshift (@sorted_children, pop(@sorted_children));
        my $child_increment = $widest_row / (scalar @{$rows[1]});
....






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]