Branch: refs/heads/yves/make_universal_import_deal_with_version_assertions
  Home:   https://github.com/Perl/perl5
  Commit: d88da0835fe50e5be295a3e79ce0ab8a712f2167
      
https://github.com/Perl/perl5/commit/d88da0835fe50e5be295a3e79ce0ab8a712f2167
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-07-21 (Fri, 21 Jul 2023)

  Changed paths:
    M t/test.pl

  Log Message:
  -----------
  t/test.pl - if string difference is before position 40 do it right

We were displaying the start of the string wrong when the difference
started before offset 40.


  Commit: a2854fc0315fe0c5a4be13acc7c347afaf4ae1fd
      
https://github.com/Perl/perl5/commit/a2854fc0315fe0c5a4be13acc7c347afaf4ae1fd
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-07-21 (Fri, 21 Jul 2023)

  Changed paths:
    M universal.c

  Log Message:
  -----------
  universal.c - handle version style imports as a version check

if someone does

    use Thing 1.234;

it is interpreted as

    BEGIN {
        require Thing;
        Thing->import();
        Thing->VERSION(1.234);
    }

however in the case of

    use Thing "1.234";

we treat it as

    BEGIN {
        require Thing;
        Thing->import("1.234");
    }

however if people use Exporter::import() as their
importer then its import will turn such cases silently into

    Thing->VERSION("1.234")

anyway.

With the new logic to detect if someone has called into
UNIVERSAL::import() with an argument we were not discriminating between
the two cases.

This patch basically does the same thing that Exporter would.


Compare: https://github.com/Perl/perl5/compare/d88da0835fe5%5E...a2854fc0315f

Reply via email to