Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Not a subroutine reference

by kapila (Acolyte)
on Sep 17, 2012 at 13:16 UTC ( #994032=perlquestion: print w/replies, xml ) Need Help??
kapila has asked for the wisdom of the Perl Monks concerning the following question:

[apache@svn-old RGT3]$ /usr/local/bin/perl /usr/local/apache2/htdoc +s/RGT3/ Hotel3.0 patch 14629 D ReleaseNotesCCR_14 +629D.txt emailid 201209171312 Not a subroutine reference at Modules/ line 35. Compilation failed in require at Modules/ line 6. BEGIN failed--compilation aborted at Modules/ line 6. Compilation failed in require at /usr/local/apache2/htdocs/RGT3/demand line 8. BEGIN failed--compilation aborted at /usr/local/apache2/htdocs/RGT3/de line 8.

I am getting this error we have withdrawn our code from backup also. no change in code which was running day before. Guess something wrong with perl installation or perl modules. Guess one developer was installing a perl module -File::Basename which was already installed may be did force install. Dont have any backup to see that. Can anyone help me diagnosis?have tried all this-

no warnings; use diagnostics -verbose; enable diagnostics;

Writing the code where getting error(though its working fine on another m/c

sub _load_constants { my %constants; foreach my $constant (@Modules::Constants::EXPORT,@Modules::Consta +nts::EXPORT_OK) { if (defined &{$Modules::Constants::{$constant}}) { $constants{$constant} = [&{$Modules::Constants::{$constant +}}]; if (scalar(@{$constants{$constant}}) == 1) { $constants{$constant} = @{$constants{$constant}}[0]; } } } return \%constants; } my $CONSTANTS_ref = _load_constants();

can anyone help me understanding what change has happened in perl modules/perl setup which i can diagnosis further. Have tried even cpan -update to update all the packages & got error-

perl NWCLARK/perl-5.8.6.tar.gz : make NO isa perl

Replies are listed 'Best First'.
Re: Not a subroutine reference
by greengaroo (Hermit) on Sep 17, 2012 at 14:16 UTC

    Can you post more of your code please? You have an error on line 8, probably on that line you use Modules::CheckCCRfiles; right? If not, can you post line 1 through 10 here? Put line 8 in bold if possible.

    Then, what is going on on Modules/ line 6? Can we see that code? Your _load_constants method, is it from Modules/

    And Modules/Util is a CPAN module right? Do you know which version you have?

    There are no stupid questions, but there are a lot of inquisitive idiots.
Re: Not a subroutine reference
by greengaroo (Hermit) on Sep 18, 2012 at 13:44 UTC

    If you find the solution on your own, can you please post it here? Thank you!

    There are no stupid questions, but there are a lot of inquisitive idiots.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://994032]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2016-12-04 11:01 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (64 votes). Check out past polls.