Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
XP is just a number
 
PerlMonks  

Re^4: can't import using exporter

by tobyink (Abbot)
on Mar 12, 2012 at 18:20 UTC ( #959155=note: print w/ replies, xml ) Need Help??


in reply to Re^3: can't import using exporter
in thread can't import using exporter

Sorry, what you actually want it something like:

BEGIN { $INC{'Debug.pm'}=__FILE__ }

Or, if you've got Module::Runtime, then:

BEGIN { $INC{module_notional_filename(__PACKAGE__)}=__FILE__ }

 

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re^4: can't import using exporter
Select or Download Code
Re^5: can't import using exporter
by perl-diddler (Friar) on Mar 12, 2012 at 21:10 UTC
    Well first I got
    > cnvWav2Flac Undefined subroutine &Debug::module_notational_filename called at /Aud +io/scripts/cnvWav2Flac line 85. Debug::BEGIN() called at /Audio/scripts/cnvWav2Flac line 85 eval {...} called at /Audio/scripts/cnvWav2Flac line 85 BEGIN failed--compilation aborted at /Audio/scripts/cnvWav2Flac line 8 +5.
    Then reading manpage, it appeared, I needed to specifically include it... however, in doing so:
    > cnvWav2Flac "module_notational_filename" is not exported by the Module::Runtime mo +dule Can't continue after import errors at /usr/lib/perl5/site_perl/5.14.2/ +Module/Runtime.pm line 154. Module::Runtime::import('Module::Runtime', 'module_notational_ +filename') called at /Audio/scripts/cnvWav2Flac line 5 main::BEGIN() called at /Audio/scripts/cnvWav2Flac line 5 eval {...} called at /Audio/scripts/cnvWav2Flac line 5 BEGIN failed--compilation aborted at /Audio/scripts/cnvWav2Flac line 5 +.> cnvWav2Flac "module_notational_filename" is not exported by the Module::Runtime mo +dule Can't continue after import errors at /usr/lib/perl5/site_perl/5.14.2/ +Module/Runtime.pm line 154. Module::Runtime::import('Module::Runtime', 'module_notational_ +filename') called at /Audio/scripts/cnvWav2Flac line 5 main::BEGIN() called at /Audio/scripts/cnvWav2Flac line 5 eval {...} called at /Audio/scripts/cnvWav2Flac line 5 BEGIN failed--compilation aborted at /Audio/scripts/cnvWav2Flac line 5 +.
    I didn't have Module::Runtime, so it was just loaded and installed from CPAN. Am I doing something wrong, or is this a bug in the module meant to work around various bugs?

    Reading the manpage, several bugs that I didn't know about, but that might explain why various programs have been breaking at each upgrade as things are 'fixed'... lexical leaks and such that I didn't know about might have caused things to work earlier, but cause failure once fixed.

    Not sure -- speculation -- I have about 10 progs or so, I've encountered so far that have stopped working as I upgraded from 5.10->12->14, actually 1 of those broke from 5.8->5.9, but given the fast pace of updates, I didn't get 12 installed until 14 was out. So I have several programs that are broken now, and are on a 'to be looked at' queue, as time allows competing with current priorities....*sigh*..

      "module_notational_filename" is not exported by the Module::Runtime module

      That's because it's called module_notional_filename.

      perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2014-04-18 18:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (471 votes), past polls