Dokumentation
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 30 Dec 2010 14:49:26 +0000 (15:49 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 30 Dec 2010 14:49:26 +0000 (15:49 +0100)
SL/Helper/Flash.pm

index 8074232..a4ad691 100644 (file)
@@ -20,3 +20,47 @@ sub render_flash {
 }
 
 1;
+
+__END__
+
+=head1 NAME
+
+SL::Helpers::Flash - helper functions for storing messages to be
+displayed to the user
+
+=head1 SYNOPSIS
+
+The flash is a store for messages that should be displayed to the
+user. Each message has a category which is usually C<information>,
+C<warning> or C<error>. The messages in each category are grouped and
+displayed in colors appropriate for their severity (e.g. errors in
+red).
+
+Messages are rendered either by calling the function C<render_flash>
+or by including the flash sub-template from a template with the
+following code:
+
+  [%- INCLUDE 'common/flash.html' %]
+
+=head1 FUNCTIONS
+
+=over 4
+
+=item C<flash $category, $message>
+
+Stores a message for the given category. The category can be either
+C<information>, C<warning> or C<error>. C<info> can also be used as an
+alias for C<information>.
+
+=item C<render_flash>
+
+Outputs the flash message by parsing the C<common/flash.html> template
+file.
+
+=back
+
+=head1 AUTHOR
+
+Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>
+
+=cut