kenahoo / Path-Class

Cross-platform path specification manipulation
http://search.cpan.org/dist/Path-Class/
15 stars 28 forks source link

Lazy load File::Copy and Perl::OSType #42

Closed dolmen closed 9 years ago

dolmen commented 9 years ago

File::Copy and Perl::OSType are used only for copy_to and move_to. This is a marginal use case for Path::Class.

So this patch delays the loading of File::Copy and Perl::OSType to the first time they are used by those methods.

kenahoo commented 9 years ago

Sounds good - I can't promise they'll stay lazy-loaded if there are other uses of File::Copy and Perl::OSType later, but at least for now it's a good way to go.