]> Sergey Matveev's repositories - public-inbox.git/commitdiff
cgi: add one-line descriptions for subroutines
authorEric Wong <e@80x24.org>
Thu, 10 Apr 2014 20:06:04 +0000 (20:06 +0000)
committerEric Wong <e@80x24.org>
Fri, 11 Apr 2014 22:23:58 +0000 (22:23 +0000)
Hopefully it's slightly easier-to-follow this way.

public-inbox-cgi

index 828c94c1672d9753652d6012356025e2864c04b8..e4e2e3a2168b7e189641ee60d8f3ed613771b3aa 100755 (executable)
@@ -99,6 +99,8 @@ sub invalid_list_mid {
        undef;
 }
 
+# /$LISTNAME/index.atom.xml                     -> Atom feed
+# /$LISTNAME/all.atom.xml                       -> Atom feed, includes replies
 sub get_atom {
        my ($ctx, $cgi, $top) = @_;
        require PublicInbox::Feed;
@@ -113,6 +115,7 @@ sub get_atom {
        ];
 }
 
+# /$LISTNAME/?before=$GIT_COMMIT                 -> HTML only
 sub get_index {
        my ($ctx, $cgi, $top) = @_;
        require PublicInbox::Feed;
@@ -127,6 +130,7 @@ sub get_index {
        ];
 }
 
+# just returns a string ref for the blob in the current ctx
 sub mid2blob {
        my ($ctx) = @_;
        local $ENV{GIT_DIR} = $ctx->{git_dir};
@@ -137,12 +141,14 @@ sub mid2blob {
        $? == 0 ? \$blob : undef;
 }
 
+# /$LISTNAME/m/$MESSAGE_ID.txt                    -> raw original
 sub get_mid_txt {
        my ($ctx, $cgi) = @_;
        my $x = mid2blob($ctx);
        $x ? [ "200 OK", {'Content-Type' => 'text/plain'}, $$x ] : r404();
 }
 
+# only used for CGI and static file generation modes
 sub set_binmode {
        my ($headers) = @_;
        if ($headers->{'Content-Type'} eq 'text/plain') {