in reply to Re: How do I get the name of the file from which the class was loaded?
in thread How do I get the name of the file from which the class was loaded?
I found this in perldata (which I should have read beforehand)#! perl -w use strict; package This::Module; our $_Filename = __FILE__; # ... package main; print "$This::Module::_Filename\n";
Now I am a little lost. Questions:#! perl -w use strict; package This::Module; use CONSTANT _Filename => __FILE__; # ... package main; #print "$This::Module::_Filename\n"; #Use of uninitialized value in concatenation (.) at getfilename1.pl li +ne 10. print " @{[ This::Module::_Filename ]}\n"; #Bareword "This::Module::_Filename" not allowed while "strict subs" in + use at getfilename1.pl line 13.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Re: How do I get the name of the file from which the class was loaded?
by merlyn (Sage) on Oct 23, 2000 at 16:00 UTC | |
by Rudif (Hermit) on Oct 24, 2000 at 00:41 UTC |