| 1 | package Win32::UrlCache::Cache; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use base qw( Win32::UrlCache ); | ||
| 6 | use Win32::TieRegistry ( Delimiter => '/' ); | ||
| 7 | use File::Spec; | ||
| 8 | |||
| 9 | sub new { | ||
| 10 | my $class = shift; | ||
| 11 | |||
| 12 | $class->SUPER::new( $class->_file ); | ||
| 13 | } | ||
| 14 | |||
| 15 | sub _file { | ||
| 16 | my $class = shift; | ||
| 17 | my $dir = $Registry->{'CUser/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders//Cache'}; | ||
| 18 | |||
| 19 | my $ie5_dir = File::Spec->catdir( $dir, 'Content.IE5' ); | ||
| 20 | $dir = $ie5_dir if -d $ie5_dir; | ||
| 21 | |||
| 22 | return File::Spec->catfile( $dir, 'index.dat' ); | ||
| 23 | } | ||
| 24 | |||
| 25 | 1; | ||
| 26 | |||
| 27 | __END__ |