ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra/Deliantra.pm
(Generate patch)

Comparing deliantra/Deliantra/Deliantra.pm (file contents):
Revision 1.19 by root, Wed Feb 22 23:02:59 2006 UTC vs.
Revision 1.22 by root, Thu Feb 23 01:55:54 2006 UTC

12 12
13use base 'Exporter'; 13use base 'Exporter';
14 14
15use Carp (); 15use Carp ();
16use Storable; 16use Storable;
17use File::Spec;
17use List::Util qw(min max); 18use List::Util qw(min max);
18 19
19#XXX: The map_* procedures scream for a map-object 20#XXX: The map_* procedures scream for a map-object
20 21
21our @EXPORT = 22our @EXPORT =
269sub init($) { 270sub init($) {
270 my ($cachedir) = @_; 271 my ($cachedir) = @_;
271 272
272 return if %ARCH; 273 return if %ARCH;
273 274
275 mkdir 0777, $cachedir;
274 *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst"; 276 *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst";
275} 277}
276 278
277=item $type = arch_attr $arch 279=item $type = arch_attr $arch
278 280
312 } 314 }
313 315
314 $attr = $_; 316 $attr = $_;
315 } 317 }
316 } 318 }
317
318 use PApp::Util;
319 warn PApp::Util::dumpval $attr;
320 319
321 $attr || \%Crossfire::Data::DEFAULT_ATTR; 320 $attr || \%Crossfire::Data::DEFAULT_ATTR;
322} 321}
323 322
324sub arch_edit_sections { 323sub arch_edit_sections {
380# return(edit_type); 379# return(edit_type);
381# 380#
382# 381#
383} 382}
384 383
385$CACHEDIR ||= "$ENV{HOME}/.crossfire"; 384$CACHEDIR ||= $ENV{HOME} ? "$ENV{HOME}/.crossfire" : File::Spec->tmpdir;
386 385
387init $CACHEDIR; 386init $CACHEDIR;
388 387
389=head1 AUTHOR 388=head1 AUTHOR
390 389

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines