I'm not sure I'm following you correctly, but it sounds like you're
just looking for symbols in the wrong package. If the symbols exist in
package 'Foo', then they're not going to exist in package 'Foo::Bar'
unless you put them there somehow.

Does accessing a constant as Foo::ConstantName work? If so, then it's
probably what I said above.

You'll need to use Exporter or a manual

  package Foo::Bar;

  BEGIN { *ConstantName = *Foo::ConstantName; }

or some other equivalent.

On Fri, Nov 7, 2008 at 8:38 AM, Jeffrey Ratcliffe
<[EMAIL PROTECTED]> wrote:
> 2008/11/4 Jeffrey Ratcliffe <[EMAIL PROTECTED]>:
>> Do you need an example?
>
> I tried out both of the approaches in:
>
> http://blogs.sun.com/akolb/entry/pitfals_of_the_perl_xs
>
> i.e. ExtUtils::Constant and stashing constants directly in the module
> name space using the XS BOOT keyword.
>
> With neither approach can I access the constants from Perl within the
> module, although both work fine when called externally.
>
> I attach the ExtUtils::Constant example from the blog.
>
> Any help appreciated
>
> Regards
>
> Jeff
>

Reply via email to