nithin February 2016

Not enough arguements for perl module-Compilation error

Hi I have a Perl script named feed_validator.pl. From this, I am calling a Perl module named fetch_sequence_vals.pm as follows:

my ($AIT_hash_ref,$SE_hash_ref,$SBC_hash_ref,$db_pack_val_tpb)=fetch_sequneceVals::seqVals();

fetch_sequence_vals.pm returns the reference of three hashes as shown below.

return(\%AIT_hash,\%SE_hash,\%SBC_hash,$db_pack_val_tpb);

Now, I am passing these three hashes as input for two Perl modules named SortFeedSeq and SeqComparator, as shown below.

my $sortfeedtrailer = SortFeedSeq::sortfeedseq(
    $region,$sortfileout,$SortedTrailerFile,\%AIT_hash,\%SE_hash,\%SBC_hash);   
my $compareseq= SeqComparator::comparator(
    $region,$SortedTrailerFile,$seq_err,$gap_err,\%AIT_hash,\%SE_hash,\%SBC_hash);

When I run feed_validator.pl, it's throwing a compilation error saying

Not enough arguments for SortFeedSeq::sortfeedseq

and

Not enough arguments for SeqComparator::comparator

I am stuck in this from few days. Kindly someone help me in solving the error. Thanks in advance.

Answers


ikegami February 2016

sortfeedseq and comparator each have a prototype. A sub's prototype dictates the syntax of calls to it, and you are violating the syntax imposed by the prototypes of these subs. Specifically, you aren't passing the correct number of arguments to the subs.

As we aren't familiar with the subs in question, we can't tell you what the expect for arguments. You'll have to consult the documentation for these modules, or study the subs themselves.

Post Status

Asked in February 2016
Viewed 3,728 times
Voted 8
Answered 1 times

Search




Leave an answer