chiark / gitweb /
docs: more work
[cgi-auth-flexible.git] / caf.pod
diff --git a/caf.pod b/caf.pod
index dad47364b99eb5e8ca3a812f4de73b97b533fa22..b0fb8d41c582eaf7715befdf308585971be2d846 100644 (file)
--- a/caf.pod
+++ b/caf.pod
@@ -464,9 +464,9 @@ yourself (and indeed you must do so if you use C<check_divert>).
 =item C<< $authreq->chain_params() >>
 
 Returns a hash of the "relevant" parameters to this request, in a form
-used by XXX.  This is all of the query parameters which are not
-related to CGI::Auth::Flexible.  The PATH_INFO from the request is
-returned as the parameter C<< '' >>.
+used by C<url_with_query_params>.  This is all of the query parameters
+which are not related to CGI::Auth::Flexible.  The PATH_INFO from the
+request is returned as the parameter C<< '' >>.
 
 xxx why use this function
 
@@ -520,8 +520,8 @@ string which will be mentioned in the log.
 
 C<$script> is a shell script fragment which must output a
 nul-separated list of filenames (e.g. the output of C<find -print0>).
-
-xxx blah blah
+It is textually surrounded by C<( )> and will be executed with C<set -e>
+in force.  Its cwd will be C<$dir>.
 
 =item C<< $verifier_or_authreq->($data) | CGI::Auth::Flexible-> >>
 
@@ -999,7 +999,11 @@ can be written directly to the named file: there is no need to
 write to a temporary file and rename.
 
 The default implementation is the module function
-C<srcdump_process_item>.  It searches the item and its parent
+C<srcdump_process_item>.
+
+It skips directories for which C<srcdump_system_dir> returns true.
+
+It then searches the item and its parent
 directories for a vcs metadata directory (one of the names in
 C<srcdump_vcs_dirs>); if found, it calls the C<srcdump_byvcs> hook
 (after checking and updaeing C<%dirsdone>).
@@ -1027,21 +1031,89 @@ C<$vcs> is derived from the entry of C<srcump_vcs_dirs> which was
 used: it's the first sequence of word characters, lowercased.
 
 The default implementation is the module function C<srcdump_byvcs>.
-It simply calls C<srcdump_dir_cpio> with the script from the setting
-C<srcdump_vcsscript_$vcs>.
+It simply calls C<srcdump_dir_cpio> with a script from the setting
+C<srcdump_vcsscript>.
 
+=item C<srcdump_vcs_dirs>
 
- which is defined
+Array ref of leaf names of vcs metadata directories.  Used by the
+default implementation of C<srcdump_process_item>.  The default value
+is C<['.git','.hg','.bzr','.svn']>.
 
-xxx conditions on listitems implied by srcdump_dirscan_prepare
-xxx listitems enoent behaviour
-The de
+=item C<srcdump_vcs_script>
 
-xxx syntax of srcdump_excludes
+Hash ref of scripts for generating vcs metadata.  Used by the default
+implementation of C<srcdump_byvcs>.  The keys are values of C<$vcs>
+(see C<srcdump_byvcs>); the values are scripts as for
+C<srcdump_dir_cpio>.
 
+The default has an entry only for C<git>:
+  git ls-files -z
+  git ls-files -z --others --exclude-from=.gitignore
+  find .git -print0
 
-=back
+=item C<srcdump_excludes>
+
+Array ref of exclude glob patterns, used by the default implementation
+of C<srcdump_novcs>.  The default value is C<['*~','*.bak','*.tmp','#*#']>.
+
+Entries must not contain C<'> or C<\>.
+
+=item C<srcdump_listitems($cgi,$verifier)>
+
+Returns an array of directories which might contain source code of the
+web application and which should be therefore be considered for
+including in the source code delivery.
+
+Used by the default implementation of C<srcdump_prepare>.
+
+Entries must be directories, plain files, or nonexistent; they may
+also be symlinks which resolve to one of those.
+
+If C<.> is included it may be treated specially - see
+C<srcdump_filter_cwd>.
+
+The default implementation returns 
+C<(@INC, $ENV{'SCRIPT_FILENAME'}, $0)>.
+
+=item C<srcdump_system_dir($cgi,$verifier,$dir)>
 
+Determines whether C<$dir> is a "system directory", in which any
+source code used by the application should nevertheless not be
+included in the source code dump.
+
+Used by the default implementation of C<srcdump_item>.
+
+The default implementation is as follows: Things in C</etc/> are
+system directories.  Things in C</usr/> are too, unless they are in
+C</usr/local/> or C</usr/lib/cgi*>.
+
+=item C<srcdump_filter_cwd>
+
+Boolean which controls the handling of C<.> if it appears in the
+return value from C<srcdump_listitems>.  Used only by the default
+implementation of C<srcdump_prepare>.
+
+If set to false, C<.> is treated normally and no special action is
+taken.
+
+However often the current directory may be C</>, or a data directory,
+or some other directory containing data which is confidential, or
+should not be included in the public source code distribution for
+other reasons.  And for historical reasons Perl has C<@INC> containing
+C<.> by default (which is arguably dangerous and wrong).
+
+So the default this setting is true, which has the following effects:
+
+C<.> is not searched for source code even if it appears in C<@INC>.
+C<.> is removed from C<@INC> and C<%INC> is checked to see if any
+modules appear to have already been loaded by virtue of C<.> appearing
+in C<@INC> and if they have it is treated as a fatal error.
+
+Only the literal string C<.> is affected.  If the cwd is included by
+any other name it is not treated specially regardless of this setting.
+
+=back
 
 =head1 DATABASE TABLES