Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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/demandbuild-hotel.pl Hotel3.0 patch 14629 D ReleaseNotesCCR_14 +629D.txt emailid 201209171312 Not a subroutine reference at Modules/Util.pm line 35. Compilation failed in require at Modules/CheckCCRfiles.pm line 6. BEGIN failed--compilation aborted at Modules/CheckCCRfiles.pm line 6. Compilation failed in require at /usr/local/apache2/htdocs/RGT3/demand +build-hotel.pl line 8. BEGIN failed--compilation aborted at /usr/local/apache2/htdocs/RGT3/de +mandbuild-hotel.pl 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

Comment on Not a subroutine reference
Select or Download Code
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 demandbuild-hotel.pl line 8, probably on that line you use Modules::CheckCCRfiles; right? If not, can you post demandbuild-hotel.pl line 1 through 10 here? Put line 8 in bold if possible.

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

    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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://994032]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2014-09-16 05:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (156 votes), past polls