Re: [bug#61240] [PATCH 2/2] Gracefully degrade if Time::HiRes is not available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-02-07 21:29, Jacob Bachmeyer wrote:
use Exporter;
-use Time::HiRes qw(stat);
use IO::File;

+# use sub-second resolution timestamps if available,
+# carry on with one-second resolution timestamps if that is all we have
+BEGIN { eval { require Time::HiRes; import Time::HiRes qw(stat) } }

Thanks for looking into this. Sorry about the long delay.

My memory was jogged by the recent Autoconf release candidate, which requires Perl 5.10 for what I think is the same reason <https://lists.gnu.org/r/autoconf/2023-03/msg00020.html>. This release candidate didn't build on my Solaris 10 server because Solaris 10 has only Perl 5.8.4. Of course I can work around this by also installing a recent Perl but that is a bit of a pain. I'll cc this email to autoconf@xxxxxxx to give them a heads-up about <https://bugs.gnu.org/61240>.

It'd be nice (though not crucial) if we could get to the bottom of this for Automake and to sync the result to Autoconf before the new Autoconf release comes out, so that Solaris 10 users of the new Autoconf need to install only recent GNU M4, and not also a recent Perl.

To get back to the proposed patch quoted above:

Why change from "use Time::HiRes qw(stat);" to "require Time::HiRes; import Time::HiRes qw(stat)"? (Again, please bear in mind that my Perl is quite rusty.)

The code formerly had "use File::stat;" before it changed to "use Time::HiRes qw(stat);". Why doesn't the proposed patch need to fall back to "use File::stat;" on older Perls lacking Time::HiRes?

Thanks again for any advice you can provide.





[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux