ExtUtils::XSpp::Node::Module - Node representing an XS++/XS MODULE declaration


ExtUtils-XSpp documentation Contained in the ExtUtils-XSpp distribution.

Index


Code Index:

NAME

Top

ExtUtils::XSpp::Node::Module - Node representing an XS++/XS MODULE declaration

DESCRIPTION

Top

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).

METHODS

Top

new

Creates a new ExtUtils::XSpp::Node::Module.

Named parameters: module indicating the name of the module.

ACCESSORS

Top

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;