ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf/pod.pm
(Generate patch)

Comparing deliantra/server/lib/cf/pod.pm (file contents):
Revision 1.21 by root, Tue Nov 3 23:44:21 2009 UTC vs.
Revision 1.27 by root, Tue Nov 6 21:52:55 2012 UTC

1#
2# 1#
3# This file is part of Deliantra, the Roguelike Realtime MMORPG. 2# This file is part of Deliantra, the Roguelike Realtime MMORPG.
4# 3#
5# Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4# Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
6# 5#
7# Deliantra is free software: you can redistribute it and/or modify it under 6# Deliantra is free software: you can redistribute it and/or modify it under
8# the terms of the Affero GNU General Public License as published by the 7# the terms of the Affero GNU General Public License as published by the
9# Free Software Foundation, either version 3 of the License, or (at your 8# Free Software Foundation, either version 3 of the License, or (at your
10# option) any later version. 9# option) any later version.
11# 10#
12# This program is distributed in the hope that it will be useful, 11# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 14# GNU General Public License for more details.
16# 15#
17# You should have received a copy of the Affero GNU General Public License 16# You should have received a copy of the Affero GNU General Public License
18# and the GNU General Public License along with this program. If not, see 17# and the GNU General Public License along with this program. If not, see
19# <http://www.gnu.org/licenses/>. 18# <http://www.gnu.org/licenses/>.
20# 19#
21# The authors can be reached via e-mail to <support@deliantra.net> 20# The authors can be reached via e-mail to <support@deliantra.net>
22# 21#
23 22
24package cf::pod; 23package cf::pod;
25 24
212 211
213sub load_pod($) { 212sub load_pod($) {
214 my ($path) = @_; 213 my ($path) = @_;
215 214
216 Coro::Storable::thaw cf::cache "cf::pod::as_paragraphs/$path" => [$path], 215 Coro::Storable::thaw cf::cache "cf::pod::as_paragraphs/$path" => [$path],
217 7 => sub { 216 8 => sub {
218 my ($src) = @_; 217 my ($src) = @_;
219 218
220 cf::fork_call { 219 cf::fork_call {
221 my $pod = $src->[0]; 220 Coro::Storable::blocking_nfreeze
222 utf8::decode $pod; 221 pom_as_paragraphs
223 Coro::Storable::blocking_nfreeze pom_as_paragraphs +(Pod::POM->new->parse_text ($pod)) 222 +(Pod::POM->new->parse_text ($src->[0]))
224 } 223 }
225 }; 224 };
226} 225}
227 226
228# format as cfpod-style text 227# format as cfpod-style text

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines