Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

The Monastery Gates

( [id://131] : superdoc . print w/replies, xml ) Need Help??

If you're new here please read PerlMonks FAQ
and Create a new user.

poll ideas quest 2024
Starts at: Jan 01, 2024 at 00:00
Ends at: Dec 31, 2024 at 23:59
Current Status: Active
1 reply by pollsters
    First, read How do I create a Poll?. Then suggest your poll here. Complete ideas are more likely to be used.

    Note that links may be used in choices but not in the title.

Perl News
TPRC Call for Papers is open!
on Feb 16, 2024 at 20:39
1 reply by talexb

    The Call for Papers for The Perl and Raku Conference 2024 is now open!

    From the TPRF website, "TPRC 2024 is being held in Las Vegas, NV from June 24-28 2024." The organizing committe has a few surprises lined up -- there will be more information to come.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

February 08, 2024 @ 6pm CT ~ Houston Perl Mongers Zoom Meeting
on Jan 29, 2024 at 19:11
3 replies by oodler
    February 08, 6pm CT ~ Houston Perl Mongers Zoom Meeting 🔗 Thu Jan 25 2024
    Title: Using Perl Prototypes

    When: Thur February 8th at 6:00-8:00 PM CT (+6 UTC)

    Where: (virtual, see below):
    Meeting ID: 920 069 702
    Password can be found by running this statement.
    perl -e 'print +(0b1000100).((3<<2)*10).(010)."\n"' # 681208
    Original post:
Enforce single hyphen for single character options in Getopt::Long
2 direct replies — Read more / Contribute
by mrnoname1000
on Feb 24, 2024 at 16:22

    Hiya, Perl newbie here! I've been learning it alongside Ruby with my background consisting of mostly shell, C, and Python (the latter of which takes a wholly different approach to argument parsing).

    As I write more Perl scripts with options, I prefer my option parser to be very strictly configured. My problem is that no matter how I configure Getopt::Long, it always accepts single character options with two preceding dashes. I achieved a compromise when rewriting one of my uglier sh+awk scripts, and here's a stripped down example:

    use Getopt::Long qw( :config posix_default gnu_compat bundling no_auto_abbrev no_ignore_case ); my $column = 1; GetOptions( 'column|c=i' => \$column, ) or die; die if $column < 1;

    I want this program to accept exactly two strings as options, --column and -c, but it also accepts --c. I want the prefix for short options to be - and only -, similar to how -- is treated for long options when bundling is enabled. I had hoped qw( :config prefix_pattern - long_prefix_pattern -- ) would get me what I want, but it seems like the latter isn't processed if the former doesn't match. Anyone know of a clean way to achieve this?

    Also, feel free to suggest improvements or mention best practices! If anyone wants, I can post the full script as well; it's intended to format numbers from stdin/files into human-readable sizes like 681.2K, 12.1M, 3.5G. I should probably figure out my preferred license as well...

is CPAN::WAIT dead?
3 direct replies — Read more / Contribute
by pope-indigent
on Feb 18, 2024 at 12:49
    Hey, CPAN suggested that I install the CPAN::WAIT module, but the tests are failing, in part I think because "" seems to have a bug; the bug is, it doesn't exist.

    So I'm wondering if WAIT is a dead horse, or if it would be worth bringing up a WAIT server on my Church's little dev box and hitting that. Or perhaps somebody already did that, and the CPAN::WAIT docs and tests could be updated.

    the WAIT module also fails to install under CPAN, and I"m not sure why ... could be the same problem. Or not.

    Before I burn a lot of time, I thought I should seek the wisdom of more enlightened souls.

    If I do bring up such a thing, and people so desire, I may make it public.

    Handers try to be helpful, and might even do so without a profit motive, if we can't find a way to profit, at least. (

Cool Uses for Perl
"Terminal Velocity", a better Linux terminal graphics demo
1 direct reply — Read more / Contribute
by cavac
on Feb 18, 2024 at 07:36

    Last week i released a simple graphics demo for the Linux terminal (Fun with terminal color).

    The low framerate and the mostly static graphics bothered me a bit. So, i , uhm did it yet again. Another demo, this time using Inline::CPP and massaged versions of tinyraytracer and tinyraycaster to provide some actual graphical content. As a matter of fact, Inline::CPP didn't work for my borrowed(*) code, and my understanding of CPP is a 20 years out of date. So i override the Inline::CPP RecDescent module to ignore my bugs. Hey, it's not production code, just a demo...

    As in the last demo, your Terminal needs to support full RGB colors and have a size of at least 270x60 in size (characters, not pixels). SDL is sort-of-optional this time; the demo will run without sound if it can't load SDL. And as said above, you'll need to install Inline::CPP as well.

    Here's the mercurial repository:

    And the YouTube video: OBS and YT compression did munge the quality a bit, though. Probably my fault for not understanding the OBS settings...

    (*) "but with every intention of giving it back"

    PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP