Sponsoring The Perl Toolchain Summit 2025: Help make this important event another success Learn more

use strict;
use Win32::TieRegistry ( Delimiter => '/' );
sub new {
my $class = shift;
$class->SUPER::new( $class->_file );
}
sub _file {
my $class = shift;
my $dir = $Registry->{'CUser/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders//Cache'};
my $ie5_dir = File::Spec->catdir( $dir, 'Content.IE5' );
$dir = $ie5_dir if -d $ie5_dir;
return File::Spec->catfile( $dir, 'index.dat' );
}
1;
__END__
=head1 NAME
Win32::UrlCache::Cache - parse Internet Explorer's Cache index.dat
=head1 SYNOPSIS
use Win32::UrlCache::Cache;
my $cache = Win32::UrlCache::Cache->new;
=head1 DESCRIPTION
This is just a sugar for Win32::UrlCache to make Win32 users happy. This will look for a path of the main 'index.dat' for IE's cache (Temporary Internet Files).
=head1 METHOD
=head2 new
searches for a cache directory in the registry, and provides it to the parent Win32::UrlCache.
=head1 AUTHOR
Kenichi Ishigaki, E<lt>ishigaki at cpan.orgE<gt>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2007 by Kenichi Ishigaki.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=cut