Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Your original question seems to be answered, but maybe this would be an opportunity to re-factor your project into something that is a little closer to common Perl project structure? Doing so would allow you to profit from existing tools that support building, testing, packaging, installing, etc. modules.

First step would be to move your modules into lib, move your tests into t, and rename tests *.pl to *.t. If you're already using Test::*, running prove -l should be sufficient to run the test suite. Another approach would be to let something like Module::Starter create an initial directory structure including all the templates and standard files. The latter approach might be a little bit more work concerning importing an already existing project, but I assume it will pay off in the long run.

+lib + Chess + Piece + Bishop.pm + King.pm + Knight.pm + Pawn.pm + Board.pm + Piece.pm + Square.pm +t + Bishop.t + King.t + Knight.t + Pawn.t + Square.t

See also Test::Simple, Test::More, Module::Starter(::PBP) (chose Module::Build or ExtUtils::MakeMaker), maybe Dist::Zilla. Meditation: RFC: How to Release Modules on CPAN in 2011


In reply to Re: How to use a .pm file in a .pl file in another directory. by Perlbotics
in thread How to use a .pm file in a .pl file in another directory. by tommyxd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-16 12:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found