POD4ASP

LTjake on 2003-11-25T18:01:40

Let's face it. ASP is a pain. I could rant - but I won't. :)

My current gripe, however, is that it has no built in documentation; like POD! Thankfully, you can easily embed POD in ASP comments and pull it back out in a snap:

pod4asp.bat

@ECHO OFF
perl -p -e "s/^' *//;" %1 | pod2html > %1.html
del *.tmp

Example input:

<%
Class MyClass

' =head1 NAME
'
' MyClass - My stupid class
'
' =head1 VERSION
'
' 0.1
'
' =head1 SYNOPSIS
'
'    Dim objClass
'    Set objClass = New MyClass
'
'    objClass.Stuff = "Things"
'
'    objClass.doStuff
'
'    Set objEmail = Nothing
'
' =head1 DESCRIPTION
'
' This class does things.
'
' =head1 CHANGE LOG
'
'    0.1 - November 25, 2003
'    + Initial Release
'
' =head1 AUTHOR
'
' =over 4
'
' =item * Me E<lt>my@email.comE<gt>
'
' =back
'
' =cut

    ' Private stuff variable
    Private m_strStuff

' =head1 METHODS
'
' =head2 Stuff()
'
' Gets/Sets Stuff.
'
' =cut

    Public Property Let Stuff( ByVal strStuff )
        m_strStuff = strStuff
    End Property

    Public Property Get Stuff( )
        Stuff = m_strStuff
    End Property

' =head2 doStuff()
'
' Does stuff.
'
' =cut

    Public Sub doStuff( )

    ' Blah, blah, blah!

    End Sub
End Class
%>

Gives you decent docs in HTML format. Yehaw.


Why stop with POD?

wnodom on 2003-11-26T22:56:54

If you're stuck with ASP, at least use PerlScript instead of VBScript. It almost makes ASP tolerable.

--Bill

Re:Why stop with POD?

LTjake on 2003-12-08T12:40:01

I wish -- but we've sort of standardized on VBScript.