Update perldocs in general plugins to point to current website/mailing list.
[blosxom-plugins.git] / general / sort_by_path
blobddd3926f57e2b645faa7b235ecca9cfa97b3a8df
1 # Blosxom Plugin: sort_by_path
2 # Author(s): Rael Dornfest <rael@oreilly.com> 
3 # Version: 2003-03-15
4 # Documentation: See the bottom of this file or type: perldoc sort_by_path
6 package sort_by_path;
8 # --- Configurable variables -----
10 # --------------------------------
12 use File::Basename;
14 sub start {
15   1;
18 sub sort {
19   return sub {
20     my($files_ref) = @_;
22     map { $_->[1] }
23       sort { $a->[0] cmp $b->[0] || $a->[1] cmp $b->[1] }
24         map { [ dirname( $_ ), $_ ] }
25           keys %$files_ref;
27   };
29   
32 __END__
34 =head1 NAME
36 Blosxom Plug-in: sort_by_path
38 =head1 SYNOPSIS
40 Sorts Weblog entries by path rather than in the default reverse-chronological
41 order.
43 Use in concert with an appropriate "date" replacement, using path instead
44 of date as the divider.  E.g.:  <p><b>$path</b></p>
46 Overrides Blosxom's default sort() subroutine.
48 =head1 INSTALLATION
50 Drop the sort_by_default  plug-in into your Blosxom plugins folder.
52 =head1 VERSION
54 2003-03-15
56 =head1 AUTHOR
58 Rael Dornfest  <rael@oreilly.com>, http://www.raelity.org/
60 This plugin is now maintained by the Blosxom Sourceforge Team,
61 <blosxom-devel@lists.sourceforge.net>.
63 =head1 SEE ALSO
65 Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/
67 Blosxom Plugin Docs: http://blosxom.sourceforge.net/documentation/users/plugins.html
69 =head1 BUGS
71 None known; please send bug reports and feedback to the Blosxom
72 development mailing list <blosxom-devel@lists.sourceforge.net>.
74 =head1 LICENSE
76 Blosxom and this Blosxom Plug-in
77 Copyright 2003, Rael Dornfest 
79 Permission is hereby granted, free of charge, to any person obtaining a
80 copy of this software and associated documentation files (the "Software"),
81 to deal in the Software without restriction, including without limitation
82 the rights to use, copy, modify, merge, publish, distribute, sublicense,
83 and/or sell copies of the Software, and to permit persons to whom the
84 Software is furnished to do so, subject to the following conditions:
86 The above copyright notice and this permission notice shall be included
87 in all copies or substantial portions of the Software.
89 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
90 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
91 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
92 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
93 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
94 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
95 OTHER DEALINGS IN THE SOFTWARE.