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*(.+)$!;
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/
64 Blosxom Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/
66 Blosxom Plugin Docs: http://www.raelity.org/apps/blosxom/plugin.shtml
70 Address bug reports and comments to the Blosxom mailing list
71 [http://www.yahoogroups.com/group/blosxom].
75 Blosxom and this Blosxom Plug-in
76 Copyright 2003, Rael Dornfest
78 Permission is hereby granted, free of charge, to any person obtaining a
79 copy of this software and associated documentation files (the "Software"),
80 to deal in the Software without restriction, including without limitation
81 the rights to use, copy, modify, merge, publish, distribute, sublicense,
82 and/or sell copies of the Software, and to permit persons to whom the
83 Software is furnished to do so, subject to the following conditions:
85 The above copyright notice and this permission notice shall be included
86 in all copies or substantial portions of the Software.
88 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
89 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
90 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
91 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
92 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
93 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
94 OTHER DEALINGS IN THE SOFTWARE.