Re: Exporting symbols

2008-11-10 Thread Jeffrey Ratcliffe
2008/11/9 Torsten Schoenfeld <[EMAIL PROTECTED]>: > Try changing, in Test.pm, this: It works. Thanks! But I don't understand why it is necessary in the .pm, but not outside it. Regards Jeff

Re: Exporting symbols

2008-11-09 Thread Torsten Schoenfeld
Jeffrey Ratcliffe wrote: I attach the ExtUtils::Constant example from the blog. Try changing, in Test.pm, this: sub test { print XST_ENUM_1, "\n"; } to this: sub test { print XST_ENUM_1(), "\n"; } -Torsten

Re: Exporting symbols

2008-11-09 Thread Jeffrey Ratcliffe
2008/11/9 Steve Fink <[EMAIL PROTECTED]>: > 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. > > Do

Re: Exporting symbols

2008-11-09 Thread Steve Fink
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

Re: Exporting symbols

2008-11-07 Thread Jeffrey Ratcliffe
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 appr