=cut
sub new {
...
}
=item C<as_string>
Ah. I think that was the thing I needed to see, really.
Though in my case it may be more like this...
sub authbox {
my ($input, $callback) = @_;
=item C<authbox>
authbox ($input, $callback);
Returns two items. The first is a string containing a hunk of xhtml
suitable for inclusion wherever a div can legally be put (e.g.,
inside a table cell or a paragraph). If the user is not logged in,
the box offers login options. If the user is logged in, it offers a
logout link. $input should be a hashref containing any form input
with keys starting with 'AUTH_'. $callback should be a closure
that, if passed a user id, returns a string containing a suitable
greeting; this string will appear in the authbox.
The second item in the returned list is the cookie string that
should be passed to the browser, if any.
=cut
# Rest of code for function goes here.
}
Currently I have roughly that form, pretty consistently,
but with comments instead of POD. I want to convert
it to POD. Unfortunately, I seem to be finding that
the version of cperl-mode I have may not support POD
properly. update:Yes it does;
there was something wrong with my POD.
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
-
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.
|