Dear Y'all - 

I'm a new lurker on the list and I have a question.

Although I'm a veteran (though by no means expert) perl coder I've
just started using perl's object oriented syntax.  I would like to use
a single module file (i.e. objects.pm) to hold all the code for the
six objects I'm creating.  That is, contained in the file
/usr/local/lib/perl5/site_perl/5.6.1/CCertS/objects.pm is:

========================= objects.pm ============================
#!/usr/bin/perl

use strict;
use Carp;
use CCertS::db_use;

package CCertS::test;

sub new {
  my ($class)=@_;
  bless { _t_id          => $_[1],
          _name          => $_[2],
          _description   => $_[3],
        }, $class;
}
...

sub store {
  my $dbh = CCertS::db_use::db_connect();

  my $name = get_name($_[0]);
  my $description = get_description($_[0]);
  $dbh->do("INSERT INTO test (name, description)
                   VALUES    (\'$name\', \'$description\')");
}

1;
=================================================================

I'd like to add:

========================= Snippet ==============================
package CCertS::user;

sub new {
  my ($class)=@_;
  bless { _fname          => $_[1],
          _lname          => $_[2],
          _username       => $_[3],
        }, $class;
}
=================================================================

The problem (as you've probably already guessed) is that my scripts
don't find CCertS::objects::test and so on.  I'll bet there's some
combination of "use Exporter" or something that will allow multiple
class definitions in a single module.  Can someone give me some simple
guidance?

     Thanks in advanve -  Yours       Billy

============================================================
     William Goedicke           [EMAIL PROTECTED]     
============================================================

          Lest we forget:

Some rise by sin and some by virtue fall.

Reply via email to