Imported source code from latest CPAN release.