Leon Timmermans > Dist-Zilla-Plugin-TemplateXS-0.002 > Dist::Zilla::Plugin::TemplateXS

Download:
Dist-Zilla-Plugin-TemplateXS-0.002.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.002   Source  

NAME ^

Dist::Zilla::Plugin::TemplateXS - A simple xs-file-from-template plugin

VERSION ^

version 0.002

SYNOPSIS ^

 ; In your profile.ini
 [TemplateXS]
 style = MakeMaker

DESCRIPTION ^

This is a ModuleMaker used for creating new XS files when minting a new dist with dzil new. It uses Text::Template (via Dist::Zilla::Role::TextTemplate) to render a template into a XS file. The template is given three variables for use in rendering: $name, the module name; $dist, the Dist::Zilla object, and $style, the style attribute that determines the location of the new file.

ATTRIBUTES ^

style

This mandatory argument affects the location of the new XS file. Possible values are:

template

This contains the path to the template that is to be used. If not set, a default template will be used that looks something like this:

 #define PERL_NO_GET_CONTEXT
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
 
 MODULE = {{ $name }}                           PACKAGE = {{ $name }}
 
 PROTOTYPES: DISABLED

METHODS ^

filename($module_name)

This returns the filename for $module_name, given the specified style.

content($module_name)

This returns the appropriate content for $module_name.

gather_files()

This adds an XS file for the main module of the distribution.

AUTHOR ^

Leon Timmermans <leont@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2014 by Leon Timmermans.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: