| ExtUtils-XSpp documentation | Contained in the ExtUtils-XSpp distribution. |
ExtUtils::XSpp::Node::Module - Node representing an XS++/XS MODULE declaration
An ExtUtils::XSpp::Node subclass representing a module declaration. For example, this XS++
%module{Some::Perl::Namespace}
would turn into this XS:
MODULE=Some::Perl::Namespace
See also: ExtUtils::XSpp::Node::Package.
In a nutshell, the module that your XS++/XS code belongs to is the main Perl package of your wrapper. A single module can (and usually does) have several packages (respectively C++ classes).
Creates a new ExtUtils::XSpp::Node::Module.
Named parameters: module indicating the name
of the module.
Returns the name of the module.
| ExtUtils-XSpp documentation | Contained in the ExtUtils-XSpp distribution. |
package ExtUtils::XSpp::Node::Module; use strict; use warnings; use base 'ExtUtils::XSpp::Node';
sub init { my $this = shift; my %args = @_; $this->{MODULE} = $args{module}; } sub to_string { 'MODULE=' . $_[0]->module } sub print { return $_[0]->to_string . "\n" }
sub module { $_[0]->{MODULE} } 1;