perlquestion
hesco
This is the feedback I get at the command line, running my test, which includes in relevant part:<p>
<code>
package AClient::Mail::Log::Parse::ListMaintainence;
sub tabulate_template_fields_by_email {
my $self = shift;
my $email = shift;
isa_ok($self->{'cfg'},'Config::Simple::Extended');
can_ok($self->{'cfg'},'param');
can_ok($self->{'cfg'},'params');
my $uid = AClient::CMS::Drupal::SimpleNews::get_uid_from_email($self,$email);
# at which point it is bombing out.
}
package AClient::CMS::Drupal::SimpleNews;
sub get_uid_from_email {
my $self = shift;
my $email = shift;
my $sql_get_uid = $self->{'cfg'}->param("sql.get_uid_from_email");
my $sth_get_uid = $self->{'dbh'}->prepare($sql_get_uid);
$sth_get_uid->execute($email);
my ($uid) = $sth_get_uid->fetchrow_array();
return $uid;
}
</code>
first from Test::More's isa_ok, and then from afailure:<p>
<code>
ok 1 - The object isa Config::Simple::Extended
ok 2 - Config::Simple::Extended->can('param')
not ok 3 - Config::Simple::Extended->can('params')
Can't locate auto/Config/Simple/Extended/params.al in @INC (@INC contains: /home/hesco/system_admin/perl/lib lib /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /home/hesco/system_admin/perl/lib/ClientsCompany/Mail/Log/Parse/ListMaintainence.pm line 186
</code>
In fact, at:<p>
<code>
/usr/lib/perl5/5.8.8
</code>
I find:<p>
<code>
/usr/lib/perl5/site_perl/5.8.8/Config/Simple/Extended.pm
</code>
My questions are these:<p>
<ul>
<li>Why is it seeking this: auto/Config/Simple/Extended/params.al, instead of this: Config/Simple/Extended.pm, which uses base 'Config::Simple' and accesses its ->param() (not ->params()) method?
<li>What does the .al signfiy? I have no files named that do I?
<li>What is the significance of the auto/ directory where it seems to be looking?
</ul>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-511760">
if( $lal && $lol ) { $life++; }<br>
if( $insurance->rationing() ) { $people->die(); }
</div></div>