The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

NAME

File::HomeDir::Win32 - Find home directories on Win32 systems

SYNOPSIS

print "My dir is ",home()," and root's is ",home('Administrator'),"\n";

DESCRIPTION

This module provides routines for finding home directories on Win32 systems. It was designed as a companion to File::HomeDir that overrides the existing home function, which does not properly locate home directories on Windows machines.

To use both modules together:

BEGIN {
if ($^O eq "MSWin32") {
eval {
File::HomeDir::Win32->import();
};
die "$@" if ($@);
}
}

or (if you have the if module),

use if ($^O eq "MSWin32"), "File::HomeDir::Win32";

The home function should work as normal.

On systems with no profiles, such as Windows 98, or in cases where it cannot find profiles, it will not override File::HomeDir. (In such cases it will die if File::HomeDir is not loaded.)

SEE ALSO

File::HomeDir

AUTHOR

Robert Rothenberg <rrwo at cpan.org>

Current maintainer: Randy Kobes <r.kobes at uwinnipeg.ca>

Suggestions and Bug Reporting

Feedback is always welcome. Please use the CPAN Request Tracker at http://rt.cpan.org to submit bug reports.

LICENSE

Copyright (c) 2005 Robert Rothenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.