Initial versions of metaclear and metamail.
[matthijs/upstream/blosxom-plugins.git] / gavinc / metaclear
diff --git a/gavinc/metaclear b/gavinc/metaclear
new file mode 100644 (file)
index 0000000..1e2ba2e
--- /dev/null
@@ -0,0 +1,83 @@
+# Blosxom Plugin: metamail
+# Author(s): Gavin Carr <gavin@openfusion.com.au>
+# Version: 0.001001
+# Documentation: 'perldoc metaclear'
+
+package metaclear;
+
+use strict;
+
+# --- Configurable variables -----
+
+# None
+
+# --------------------------------
+
+sub start { 1 };
+
+sub story {
+  %blosxom::meta = ();
+  return 1;
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+metaclear - clear/reset the %blosxom::meta hash at the start of a story
+
+=head1 DESCRIPTION
+
+metaclear is a plugin to clear/reset the %blosxom::meta hash at the start
+of a story. It should be used with any of the new-style meta plugins like 
+L<metamail>, L<metadir>, L<metafile>, etc., and must be called B<BEFORE> 
+any of those.
+
+=head1 USAGE
+
+Should be loaded early, before all other meta plugins e.g. as 01metaclear. 
+
+=head1 SEE ALSO
+
+L<metamail>, L<metadir>, L<metafile>
+
+Blosxom: http://blosxom.sourceforge.net/
+
+=head1 BUGS
+
+Messing with variables in other packages is evil. This should really use 
+some kind of Blosxom::Meta API instead.
+
+=head1 AUTHOR
+
+Gavin Carr <gavin@openfusion.com.au>, http://www.openfusion.net/
+
+=head1 LICENSE
+
+Copyright 2007, Gavin Carr.
+
+This plugin is licensed under the same terms as blosxom itself i.e.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+=cut
+
+# vim:ft=perl