2 # Author(s): Rael Dornfest <rael@oreilly.com>
4 # Documentation: See the bottom of this file or type: perldoc readme
8 # --- Configurable variables -----
10 # What prefix should I expect prepended to each meta tag?
11 my $meta_prefix = 'meta-';
13 # --------------------------------
20 my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_;
22 $$_ = undef foreach @keys;
25 my($body, $in_header) = ('', 1);
26 foreach ( split /\n/, $$body_ref ) {
27 /^\s*$/ and $in_header = 0 and next;
29 my($key, $value) = m!^$meta_prefix(.+?)\s*:\s*(.+)$!;
30 $key =~ /^\w+$/ and push(@keys,$key) and $$key = $value and next;
49 Purpose: Populates the $meta namespace with variables corresponding to meta tags found in the "header" (anything before a blank line) of a weblog post, removing the meta tags along the way. These variables are available to plug-ins and flavour templates as $meta::variablename.
55 Version number coincides with the version of Blosxom with which the
56 current version was first bundled.
60 Rael Dornfest <rael@oreilly.com>, http://www.raelity.org/
62 This plugin is now maintained by the Blosxom Sourceforge Team,
63 <blosxom-devel@lists.sourceforge.net>.
67 Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/
69 Blosxom Plugin Docs: http://blosxom.sourceforge.net/documentation/users/plugins.html
73 None known; please send bug reports and feedback to the Blosxom
74 development mailing list <blosxom-devel@lists.sourceforge.net>.
78 Blosxom and this Blosxom Plug-in
79 Copyright 2003, Rael Dornfest
81 Permission is hereby granted, free of charge, to any person obtaining a
82 copy of this software and associated documentation files (the "Software"),
83 to deal in the Software without restriction, including without limitation
84 the rights to use, copy, modify, merge, publish, distribute, sublicense,
85 and/or sell copies of the Software, and to permit persons to whom the
86 Software is furnished to do so, subject to the following conditions:
88 The above copyright notice and this permission notice shall be included
89 in all copies or substantial portions of the Software.
91 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
92 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
93 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
94 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
95 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
96 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
97 OTHER DEALINGS IN THE SOFTWARE.