… | |
… | |
1909 | |
1909 | |
1910 | # the temporary/swap location |
1910 | # the temporary/swap location |
1911 | sub save_path { |
1911 | sub save_path { |
1912 | my ($self) = @_; |
1912 | my ($self) = @_; |
1913 | |
1913 | |
1914 | (my $path = $_[0]{path}) =~ s/\//$PATH_SEP/g; |
1914 | (my $path = $_[0]{path}) =~ s/\//$PATH_SEP/go; |
1915 | "$TMPDIR/$path.map" |
1915 | "$TMPDIR/$path.map" |
1916 | } |
1916 | } |
1917 | |
1917 | |
1918 | # the unique path, undef == no special unique path |
1918 | # the unique path, undef == no special unique path |
1919 | sub uniq_path { |
1919 | sub uniq_path { |
1920 | my ($self) = @_; |
1920 | my ($self) = @_; |
1921 | |
1921 | |
1922 | (my $path = $_[0]{path}) =~ s/\//$PATH_SEP/g; |
1922 | (my $path = $_[0]{path}) =~ s/\//$PATH_SEP/go; |
1923 | "$UNIQUEDIR/$path" |
1923 | "$UNIQUEDIR/$path" |
1924 | } |
1924 | } |
1925 | |
1925 | |
1926 | # and all this just because we cannot iterate over |
1926 | # and all this just because we cannot iterate over |
1927 | # all maps in C++... |
1927 | # all maps in C++... |
… | |
… | |
2373 | |
2373 | |
2374 | sub unique_maps() { |
2374 | sub unique_maps() { |
2375 | [ |
2375 | [ |
2376 | map { |
2376 | map { |
2377 | utf8::decode $_; |
2377 | utf8::decode $_; |
2378 | /\.map$/ |
2378 | s/\.map$//; # TODO future compatibility hack |
|
|
2379 | /\.pst$/ || !/^$PATH_SEP/o # TODO unique maps apparebntly lack the .map suffix :/ |
|
|
2380 | ? () |
2379 | ? normalise $_ |
2381 | : normalise $_ |
2380 | : () |
|
|
2381 | } @{ aio_readdir $UNIQUEDIR or [] } |
2382 | } @{ aio_readdir $UNIQUEDIR or [] } |
2382 | ] |
2383 | ] |
2383 | } |
2384 | } |
2384 | |
2385 | |
2385 | =back |
2386 | =back |
… | |
… | |
2392 | |
2393 | |
2393 | =over 4 |
2394 | =over 4 |
2394 | |
2395 | |
2395 | =item $ob->inv_recursive |
2396 | =item $ob->inv_recursive |
2396 | |
2397 | |
2397 | Returns the inventory of the object _and_ their inventories, recursively. |
2398 | Returns the inventory of the object I<and> their inventories, recursively, |
|
|
2399 | but I<not> the object itself. |
2398 | |
2400 | |
2399 | =cut |
2401 | =cut |
2400 | |
2402 | |
2401 | sub inv_recursive_; |
2403 | sub inv_recursive_; |
2402 | sub inv_recursive_ { |
2404 | sub inv_recursive_ { |
… | |
… | |
2407 | inv_recursive_ inv $_[0] |
2409 | inv_recursive_ inv $_[0] |
2408 | } |
2410 | } |
2409 | |
2411 | |
2410 | =item $ref = $ob->ref |
2412 | =item $ref = $ob->ref |
2411 | |
2413 | |
2412 | creates and returns a persistent reference to an objetc that can be stored as a string. |
2414 | Creates and returns a persistent reference to an object that can be stored as a string. |
2413 | |
2415 | |
2414 | =item $ob = cf::object::deref ($refstring) |
2416 | =item $ob = cf::object::deref ($refstring) |
2415 | |
2417 | |
2416 | returns the objetc referenced by refstring. may return undef when it cnanot find the object, |
2418 | returns the objetc referenced by refstring. may return undef when it cnanot find the object, |
2417 | even if the object actually exists. May block. |
2419 | even if the object actually exists. May block. |