Hi,
I am trying to build my first module:
package KI;
# Create a constructor method
=head1 new()
Create a new KI object
=cut
sub new{
my $class = shift;
my $self = {};
bless $self, $class;
return $self;
} # end method new
=head1 test
test
=cut
sub test {
my $self = shift;
my %WDF = ();
$WDF{ 'name' } = "Jerry Preston";
print "name $WDF{ 'name' }<BR>";
return \%WDF;
}1;
My program to test out my module is:
#!/usr/local/bin/perl
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use KI;
$ki = new KI();
$query=new CGI;
print $query->header();
print $query->start_html( -title => 'test' );
print $query->startform( -method => 'POST', -name => 'test' );
%wdf = $ki->test;
print "name *$wdf{ 'name' }*<br>";
print $query->end_form();
I am not sure what I am doing wrong. The module test will print out my name, but I
cannot get
my script to print out my name.
Any ideas?
Thanks,
Jerry
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]