projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55b83cb
)
avoid crashing if Sort::Naturally is not installed
author
Joey Hess
<joey@gnu.kitenet.net>
Thu, 19 Mar 2009 19:35:57 +0000
(15:35 -0400)
committer
Joey Hess
<joey@gnu.kitenet.net>
Thu, 19 Mar 2009 19:35:57 +0000
(15:35 -0400)
IkiWiki/Plugin/inline.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/inline.pm
b/IkiWiki/Plugin/inline.pm
index a89e827c1c7ff2ecf2a877c7dd48d11e2105fbcd..218fd7515f6a15b866f2e0424f1fc5d2723a6a6f 100644
(file)
--- a/
IkiWiki/Plugin/inline.pm
+++ b/
IkiWiki/Plugin/inline.pm
@@
-195,7
+195,10
@@
sub preprocess_inline (@) {
@list=sort { pagetitle(basename($a)) cmp pagetitle(basename($b)) } @list;
}
elsif (exists $params{sort} && $params{sort} eq 'title_natural') {
- require Sort::Naturally;
+ eval q{use Sort::Naturally};
+ if ($@) {
+ error(gettext("Sort::Naturally needed for title_natural sort"));
+ }
@list=sort { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) } @list;
}
elsif (exists $params{sort} && $params{sort} eq 'mtime') {