Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Driving the Engine right off the road

by hippo (Archbishop)
on Aug 22, 2025 at 18:48 UTC ( [id://11166083]=note: print w/replies, xml ) Need Help??


in reply to Driving the Engine right off the road

I'll explain in english what I need.

That can be useful but it's fuzzy. Far better to write tests which may or may not work. See How to ask better questions using Test::More and sample data

If you can negate the logic then (from your fuzzy description) I think it should be quite simple:

use strict; use warnings; use Test::More; my @good = qw/PKG_CONFIG_PATH XDG_DATA_DIRS/; my @bad = qw/XDG_SEAT_PATH XDG_SESSION_PATH/; plan tests => @good + @bad; my $re = qr/^XDG.*PATH$/; for my $str (@good) { unlike $str, $re, "good $str does not match"; } for my $str (@bad) { like $str, $re, "bad $str matches"; }

🦛

Replies are listed 'Best First'.
Re^2: Driving the Engine right off the road
by Intrepid (Curate) on Aug 22, 2025 at 20:42 UTC
    hippo suggested:
    See How to ask better questions using Test::More and sample data

    Huh, I never thought of anything like that for writing-up questions for PMo. Very good suggestion, I'll try that mode in the future.

        – Soren

    Aug 22, 2025 at 20:41 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11166083]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2026-01-16 00:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (118 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.