I'd create a module for each platform, and load the appropriate module.
sub get_sys_info { if ($^O eq 'Win32') { require My::SystemInfo::Win32; return My::SystemInfo::Win32->new(); } else { require My::SystemInfo::Unix; return My::SystemInfo::Unix->new(); } } my $sys_info = get_sys_info(); ... $sys_info->wdpi ...
In reply to Re: how do I use Win32::TieRegistry in a multi-platform program?
by ikegami
in thread how do I use Win32::TieRegistry in a multi-platform program?
by perltux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |