Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

inkdroid (3294)

inkdroid
  (email not shown publicly)
http://www.inkdroid.org/
AOL IM: inkdroid (Add Buddy, Send Message)
Yahoo! ID: summe_e (Add User, Send Message)
Jabber: inkdroid

inkdroid is a person, not a robot. however, inkdroid likes ink. inkdroid likes perl too.

Journal of inkdroid (3294)

Thursday July 31, 2003
01:43 PM

POD in PHP

[ #13816 ]
I work with PHP and Perl alot during the day. I've been internally bewailing the fact that there is no POD like documentation format for PHP. At least none that comes standard, as POD and javadoc do for Perl/Java. Then I was looking closely at one of the PHP class files I was editing and noticed that someone (it had to be petdance) had done this:

/*

=head1 NAME

Page - A base class for all HTML pages.

=cut

*/

class Page {

/*

=head2 Page()

The constructor for the Page object. Pass in the args, etc, etc.

=cut

*/

function Page() {
     ... do PHP stuff here...
}

...

So it's PHP but it has POD embedded in it within PHP multiline comments. So then you can run perldoc on the PHP file, and kazaam you get a nice POD document on the screen. I have no idea why this never occurred to me before, the solution is so simple it's pure genius :) Thanks Andy, this made my day.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.