Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Thanks for the feedback. Perhaps Module::Stub is a better name. I also like your idea for using importer semantics instead of calling stub.

I was aware of Test::MockObject, but not MockModule. However, these are tools for writing tests; I intend Module::Stub to be more general purpose, and useable in production code.

Also I would be sure the stub module is properly added to the %INC hash, otherwise require and use will try to load the real module. (you may have already done this, but you didn't post code, so I don't know).
This depends on the circumstances. I am intending to stub when the module is not installed on the target system, so the 'real' module won't be there anyway. But a lot depends on how Module::Stub is going to be used.

Regarding the status of the module, I have not written any code yet, just the POD sections I posted in the root node. I do feel that there is sufficient interest here, and I will spend time on it and release the module. I will address the API issues of subclassing or plugins as I develop it. I also agree with your last sentence and revdiablo's comment - I want this module to be accessible to a large audience, which does not have a grasp of Perl's arcane features, such as symbol tables, coderefs in @INC, the %INC hash, etc.

I'm Not Just Another Perl Hacker

In reply to Re^2: RFC: Module::Stubber by rinceWind
in thread RFC: Module::Stubber by rinceWind

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 or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (1)
As of 2022-07-07 08:00 GMT
Find Nodes?
    Voting Booth?

    No recent polls found