Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
creating relations between tables

Posted by revtopo (revtopo), 11 July 2007
Hi all,

I have been writing scripts in perl to work with maypole(to create web interrface). in that i would like to create a database. i have starte up with the web interface but cant get the relation between the tables.

this is the code that am using:

TOPO->config->{display_tables} = [qw[VENTRY VENTRYABSTRACT]];
TOPO->config->{loader}->relationship($_) for

and the error am getting is

Use of uninitialized value in substitution (s///) at /jic-atidb/perl/lib/5.8.0/ line 16., referer:
[Wed Jul 11 15:29:16 2007] [error] [client]
Use of uninitialized value in string ne at /jic-atidb/perl/lib/5.8.0/ line 17., referer:

the error is pointing to the lines that i have included.

could any one help me out of this please.

Posted by KevinAD (KevinAD), 17 July 2007
since there is no regexp (s///) or "ne" operator in the lines you posted, they must not be the correct lines.

Posted by revtopo (revtopo), 17 July 2007
bu those are the erros at that time. can't even now what they speak about.

ok let me quote my other error am getting now. in the Maypole program its pointing error that:

Can't call method "class_of" on an undefined value at /home/jic-atidb/perl/lib/site_perl/5.8.0/ line 635, <DATA> line 1.\n, referer:
[Tue Jul 17 11:02:11 2007] [error] [client] Can't get() nothing! at /home/jic-atidb/perl/lib/site_perl/5.8.0/ line 640\n, referer:

the code used is  as folllows:

package TOPO;
use warnings;
use Carp;
use base 'Apache::MVC';
use Class:BI::Loader::Relationship;
use Data:umper;
use Maypole::Constants;
use Maypole::Application;
my $title = "TOPO database. Very rudimentary interface as a starting point for development.";

TOPO->setup("dbi:mysql:topo_interpro2","nobody","",{AutoCommit => 1, PrintError => 1});
TOPO->config->{uri_base} = "";
TOPO->config->{rows_per_page} = 20;
TOPO->config->{template_root} = "/jic-atidb/w3/topo/";
TOPO->config->{application_name} = $title;

TOPO->config->{loader}->relationship($_) for
(" entry has abstracts");

sub debug {
   return 2;

could any one find were the error is

Posted by KevinAD (KevinAD), 17 July 2007
I'm sorry but the many modules you are using are unfamiliar to me and make trying to help with specific errors impossble for me. But maybe this is part of the problem:

the above URL is inaccessible without proper authorization.  

Posted by revtopo (revtopo), 17 July 2007
thanks for your reply,

thats not the problem. that is the web link were my database can be accessed. but sry only me and my supervisor could access that.

but any how access to that is not essential .
the progrm is written on 'maypole' an application program  which uses perl to write codes for their functioning.

however the problem is in the Class:BI( i think) which cant call the class or something like this.


Posted by KevinAD (KevinAD), 17 July 2007
You could be right about where the problem is, I simply do not know. I can only suggest standard debugging procedures. Start with the simplest code possible and add to it one step at a time until you pin-point the source of the problem. Maybe that is where you arecurrently.  Hopefully someone else will know something that can help you. Maybe try another forum if you get no responses here.

Posted by revtopo (revtopo), 17 July 2007
hi kevin,

thanks for your reply. but i have debugged the progrm in unix which points the error to the DBI line. but i could not get why is that so are wat to do for that.

and i have tried with other forums too but i havent got any response still.

Posted by KevinAD (KevinAD), 18 July 2007
Maybe this line is the problem:

TOPO->config->{loader}->relationship($_) for
(" entry has abstracts");

where is the value for  $_ coming from?

Posted by revtopo (revtopo), 18 July 2007

hi kevin,
yeah, the problem is with that line.

the errorrelated with tht is :

failed to resolve handler `TOPO': Can't call method "has_many" on an undefined value at /home/jic-atidb/lib/site_perl/5.8.0//Class/DBI/Loader/ line 96

but the $_ is the collection of all the tables that are in the topo_interpro2. what is my thought  is ,some thing is going wrong with the class dbi which cant make the relation.

that wil be surely silly but i cant get what that is


Posted by KevinAD (KevinAD), 18 July 2007
print $_ before the line that throws the errror and see what it's value is:

print "\$_ = $_";

the error says it's undefined which means it is empty or undef or 0 (zero).

Posted by revtopo (revtopo), 19 July 2007

yeah that statement doesn't prodeuce any output.

but what?
can we initialise for that $_?

can that be something like this
$_ = " ";

Posted by KevinAD (KevinAD), 19 July 2007
[quote author=revtopo link=board=perl;num=1184164681;start=0#10 date=07/19/07 at 14:34:12]hi

yeah that statement doesn't prodeuce any output.

but what?
can we initialise for that $_?

can that be something like this
$_ = " ";


It can be something like that: $_ = " " but I doubt that will help as that is an empty value. My feeling is you are doing something fundamentally incorrect. Since I have no knowledge of the modules you are using I can only suggest you find some documentation about how to use TOPO or Maypole correctly. That is as much help as I can offer at this point.

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho