set_sql creates a *closure* named 'sql_' + key. There is no corresponding closure with a name without the 'sql_' on it. There is a set_sql in the Class::DBI module that checks the connection to make sure the correct one gets passed to the Ima::DBI set_sql method. set_sql in Ima::DBI passes the statement to _mk_sql_closure to make the closure. So sql_maxid is NOT a method, but rather a closure. There is some GLOB magic going on that makes it appear like a method. See the subs sql_set and _mk_sql_closure inside of the Ima::DBI module.
-
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.
|