Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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
[Discipulus]: I still use but I also attract many critics for this: I use when I call subs defined in the very same file, just to recognize them. You can avoid (but sometimes is needed)
[marto]: believe it or not this is a SPAM account :P
[Discipulus]: it seems a legitimate one.. grin ..

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2018-05-22 12:16 GMT
Find Nodes?
    Voting Booth?