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

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I installed Devel::Cover and ran it against my web application test suite, and got some lovely coverage information about .. my test suite.

My next step was to use Devel::Cover in the web application itself, and to do that I needed to specify the directory where I wanted to leave its database. Simple!

Or not. I tried setting %ENV in a BEGIN clause in the top-level module -- it didn't take. I tried using SetEnv in the httpd.conf file and doing a graceful restart of Apache. Nope -- no luck.

So now I'm wondering if anyone else has managed to do this -- I plan on adding more options so that Devel::Cover doesn't map out all of the parts of CGI::Application that get used -- fascinating information, but not relevant to my goal, which is to find out which paths in my code get used for particular functions.

Update at 1445, February 14, 2007: dragonchild asks, why would I want to do this? Good question.

I'm a one-man web development team, so can't really do the XP thing with anyone else. This means tools like Devel::Cover will help me understand what's happening with my code when I perform certain operations in the web application.

My first shot at using Devel::Cover was yesterday, when I ran it again my test scripts, which use LWP::UserAgent (for REST access) and WWW:Mechanize (for web access) to communicate with my web application. This produced coverage for my test scripts, but I'm more interested in the source code of my application, hence the quest for turning it on, and setting some options, from within Apache.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

In reply to Setting Devel::Cover options for a web application by talexb

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?

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 chanting in the Monastery: (3)
As of 2023-10-03 00:56 GMT
Find Nodes?
    Voting Booth?

    No recent polls found