M
Marten Lehmann
Hello,
within a perl module, I need to access content included with this
module, but stored in separate files (WSDL definitions in my case).
If my module lies in /usr/lib/perl5/xxx/MyModule.pm, the WDSL files
could be stored in /usr/lib/perl5/xxx/MyModule/WSDLs/*.wsdl or similar.
But how can the perl module find out where it has been loaded from? The
files I have to access would always be relative to the perl module. But
that doesn't help much, as the working directory within the perl module
for a perl script in /test/script.pl would always be /test and not the
path to the script. So reading from ./WSDLs/*.wsdl would fail.
Any ideas?
Regards
Marten
within a perl module, I need to access content included with this
module, but stored in separate files (WSDL definitions in my case).
If my module lies in /usr/lib/perl5/xxx/MyModule.pm, the WDSL files
could be stored in /usr/lib/perl5/xxx/MyModule/WSDLs/*.wsdl or similar.
But how can the perl module find out where it has been loaded from? The
files I have to access would always be relative to the perl module. But
that doesn't help much, as the working directory within the perl module
for a perl script in /test/script.pl would always be /test and not the
path to the script. So reading from ./WSDLs/*.wsdl would fail.
Any ideas?
Regards
Marten