Hello All,
I have a problem at work I need to solve. I am toying with the idea
of creating a special purpose Perl module to store data on some of
clients. So I have written a little test/proof of concept/far from
complete module that looks like this:
package NOVA::Client;
use strict;
use Carp;
sub new
{
my ($class) = @_;
bless {
_count => $_[1],
_begin_dt => $_[2],
_end_dt => $_[3],
_days => $_[4],
_completed => $_[5],
}, $class
}
sub get_days {
return $_[0]->{_days};
}
1;
----------
My test program looks like this:
#!/usr/local/bin/perl -w
# program: t_client.pl
use strict;
use Carp;
use NOVA::Client;
my $client = NOVA::Client->new("1", "7-1-2005", "6-30-2006","365","1");
print "New Client Days: $client->get_days\n";
----------
But my output is this:
[/Users/ehughes/Projects/Perl] # perl t_client.pl
New Client Days: NOVA::Client=HASH(0x1801380)->get_days
I must be a lot brain tired because I am forgetting something. Can
anyone tell me where I went wrong?
Thanks,
Elton
MacOS X 10.4.7
Perl 5.8.6