in reply to Re: Curious behavior of Use
in thread Curious behavior of Use

As requested: my scratchpad

Replies are listed 'Best First'.
Re^3: Curious behavior of Use
by hippo (Archbishop) on Feb 22, 2025 at 11:00 UTC
    use Switch;

    Well, that's a likely problem right there. Source filters tend to introduce this sort of trouble. From the FAQ:

    Starting from Perl 5.8, a source filter module, Switch, can also be used to get switch and case. Its use is now discouraged, because it's not fully compatible with the native switch of Perl 5.10, and because, as it's implemented as a source filter, it doesn't always work as intended when complex syntax is involved.

    🦛

Re^3: Curious behavior of Use
by etj (Priest) on Feb 22, 2025 at 00:23 UTC
    If you look at that, you'll see it's unreadable. You need to put <c> tags around it. Also, why not just post it on this thread, instead of your scratchpad? It's OK to sanitise it.
      Oops. I had no idea -- sorry 'bout that.

        So, help everybody to help you and post your minimal code in this thread, wrapped in <c>...</c>

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re^3: Curious behavior of Use
by ikegami (Patriarch) on Feb 24, 2025 at 16:34 UTC

    That's hardly a minimal demonstration.

    And I can't replicate it. I get the following even if I comment out the require:

    Use of uninitialized value $me in string eq at t.pl line 19. Use of uninitialized value $me in string eq at t.pl line 26. Use of uninitialized value $me in string eq at t.pl line 33.