… | |
… | |
277 | Load uncached - same as load, but does not cache the image, which means it |
277 | Load uncached - same as load, but does not cache the image, which means it |
278 | is I<always> loaded from the filesystem again. |
278 | is I<always> loaded from the filesystem again. |
279 | |
279 | |
280 | =cut |
280 | =cut |
281 | |
281 | |
282 | sub load_uc($) { |
|
|
283 | $self->new_img_from_file ($path) |
|
|
284 | } |
|
|
285 | |
|
|
286 | sub load($) { |
282 | sub load($) { |
287 | my ($path) = @_; |
283 | my ($path) = @_; |
288 | |
284 | |
289 | $_IMG_CACHE{$path} || do { |
285 | $_IMG_CACHE{$path} || do { |
290 | my $img = load_uc $path; |
286 | my $img = $self->new_img_from_file ($path); |
291 | Scalar::Util::weaken ($_IMG_CACHE{$path} = $img); |
287 | Scalar::Util::weaken ($_IMG_CACHE{$path} = $img); |
292 | $img |
288 | $img |
293 | } |
289 | } |
294 | } |
290 | } |
295 | |
291 | |