Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

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

I did catch the first issue, see my reply to Ovid for the currently-working version (I'll update my top node eventually).

As to the second point, I think you might have mis-read the code. The else is paired with if (DBI::db->can($op)) -- I don't die when that is false. Basically, if I try TestModule->prepar by accident, the else block is run because a database handle can't 'prepar'. My test suite verifies this.

Tests:

is ($obj->heekify, undef, 'Autoloading a bad sub fails'); is ($obj->error, 'Cannot autoload heekify', 'Error set correctly');

And both pass under the code in the reply to Ovid I mentioned above (the first passes in the code you're referencing, but as you point out, the error wasn't set).

As for the last two points, that is useful information for optimization. However, under the current form of usage, the whole script that calls this module only takes 3s to run. I will keep those tips handy for later, if optimization becomes an issue. Thank you -- I always love thinking about stuff like that!

<-radiant.matrix->
A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
"In any sufficiently large group of people, most are idiots" - Kaa's Law

In reply to Re^4: Using AUTOLOAD to create class methods by radiantmatrix
in thread Using AUTOLOAD to create class methods by radiantmatrix

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 having an uproarious good time at the Monastery: (5)
As of 2024-04-25 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found