Re: Loading/registering multiple xsubs

[email protected] (Torsten Schoenfeld)
Newsgroups perl.xs
Message-ID <[email protected]>
On 12.10.2011 12:38, Jeffrey Ratcliffe wrote:
> Assuming we have
>
> Foo.xs
> Fo.pm
> Foo_Bar.xs
>
> how do I get Foo::Bar to load/boot/import at the same time as Foo on use Foo?

You have to call Foo_Bar.xs' BOOT section (which wires up the xsubs) 
from Foo.xs' BOOT section.  Look at Glib.xs' BOOT section for an 
example.  For Gtk2 and below, this is handled by Gtk2::CodeGen->write_boot.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.