in reply to Conditional use of Win32::TieRegistry

Hello hilitai

you can check $^O to see if you are running on windows: see perlvar then require the module and eventully import, if the module uses Exporter's import.

if ($^O eq 'MSWin32'){ require Win32::TieRegistry; Win32::TieRegistry -> import if Win32::TieRegistry -> can ("import" +); }

See also use module if condition is met for suggestion about if module.

PS this kind of things are worth to reside into a BEGIN block.

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.