Andrew Johnson > HeliosX-JSService-0.01_4703 > hxjs_make_project.pl

Download:
HeliosX-JSService-0.01_4703.tar.gz

Annotate this POD

Source  

NAME ^

hxjs_make_project.pl - create a project to generate the Perl side of a HeliosX::JSService-based service

SYNOPSIS ^

 # create all the Perl boilerplate for a HeliosX::JSService class
 # allowing the developer to focus on JavaScript code
 hxjs_make_project.pl --conf=service_desc.xml

 # just prints version info
 hxjs_make_project.pl --version

DESCRIPTION ^

Rather than leave the JavaScript developer to figure out the complexities of Perl, Makefiles, and, ExtUtils::MakeMaker on their own, hxjs_make_project.pl can be used to setup all of the Perl side of a HeliosX::JSService-based Helios service, allowing the JavaScript developer to focus on JavaScript code. Developers can create an XML file describing the service class they wish to make and any needed CPAN modules, then run this program to create the project and all the Perl boilerplate.

SERVICE DESCRIPTION XML ^

Here is an example service descriptor for a Helios::JSService called ExampleService:

 <hxjsDescription>
        <servicename>ExampleService</servicename>
        <jssource>example.js</jssource>
        <PerlModules> 
                <module>DBI</module>
                <module>Solr::Client</module>
        </PerlModules>
        <bindVariables>
                <object>
                        <jsvar>DBI</jsvar>
                        <perlvar>DBI</perlvar>
                </object>
                <object>
                        <jsvar>SolrClient</jsvar>
                        <perlvar>Solr::Client</perlvar>
                </object>
        </bindVariables>

 </hxjsDescription>

Several points: (expand on this before production!) #[]

FUNCTIONS ^

parseArgs()

parseServiceConfig()

parseTemplates

createModuleStub(SERVICENAME => $servicename, SCRIPTNAME => $scriptname)

createCJSC

createMakeMakerProject($servicename)

writeModuleStub

writeJSStub

AUTHOR ^

Andrew Johnson, <lajandy at cpan dot org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2011 by Andrew Johnson

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: