Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

PERL build using unit test and static analysis

by mypearl (Initiate)
on May 24, 2012 at 07:04 UTC ( #972189=perlquestion: print w/ replies, xml ) Need Help??
mypearl has asked for the wisdom of the Perl Monks concerning the following question:


I am working for creating perl BUILD on windows7 and I am successful in running the build for single module. I followed following steps:

1) I used module-starter to create new module. It has lib/ and few testing .t scripts in t directory.

2) Then I ran perl, perl Build, perl Build test and then perl Build dist. Hence I get a archived file in the end as an output. I used Module::Build in

3) Here the module-starter gives you sample code with test::more module in t directory.

So this process I have understood but I am not completely clear on the build concept. I have few doubts:

My development environment is like this:
C:/perl ---Activestate perl 5.14.2
C:/development ---main folder for perl code
C:/development/project_name/bin/*.pl ---PL files (single PL or PL which calls functions from PM files in lib directory mentioned below)
C:/development/project_name/lib/*.pm ---PM files (custom PM having functions being called by PL files mentioned above in bin directory)

Q1.) Is this Directory structure fine?
Q2.) Where should I keep the build scripts in above structure (if above structure is fine)?
Q3.) Will there be a single build script for a complete development folder OR there should be multiple build scripts for each PL/PM file.
Q4.) Is Module::Build sufficient to create the Build for the whole structure including PL,PM files?
Q5.) What should be the structure of Build code? Should it be the same which Module-starter gives you. If yes, then what should be the structure of "t" directory in it? Please guide me explicitly how should be the build directory and which files should be there

Comment on PERL build using unit test and static analysis
Replies are listed 'Best First'.
Re: PERL build using unit test and static analysis
by Anonymous Monk on May 24, 2012 at 07:36 UTC
Re: PERL build using unit test and static analysis
by eyepopslikeamosquito (Chancellor) on May 24, 2012 at 11:08 UTC

    I have to achieve Junit formatting for Unit tests
    Does TAP::Formatter::JUnit do what you want? Don't forget to check out other CPAN TAP::Formatter modules.

Re: PERL build using unit test and static analysis
by choroba (Canon) on May 24, 2012 at 11:53 UTC
    Crossposted at Stackoverflow. It is considered polite to inform about crossposting so people not attending both sites do not waste their time on problems already solved elsewhere.
      Yes, I will surely inform all once problem gets resolved. This is crossposted as I am stuck and want to get rid of the doubts ASAP. Thanks for your concern.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://972189]
Approved by kcott
Front-paged by kcott
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2016-02-06 19:07 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (235 votes), past polls