Advertisement · 728 × 90
#
Hashtag
#perlbrew
Advertisement · 728 × 90

雖然寫了 prompt() 的單元測試,但 e2e 測試要怎麼模擬出有人在前面按 Y 或 N ...

好像只能在 shell script 中靠類似這種方式:

yes | perlbrew ...
yes n | perlbrew ...
echo | perlbrew ...

#perlbrew

0 0 1 0
Preview
add: A minimum implementation of prompt() by gugod · Pull Request #856 · gugod/App-perlbrew As a way to address the issue of #843

https://github.com/gugod/App-perlbrew/pull/856

#perl

open my $in, '<' \$str;
open my $out, '>', \$str;

我記得這語法在很舊的 perl 是不管用的,但我應該不必擔心(吧)

0 0 0 0
Preview
New Perlbrew install can't install Perls. Can't locate ExtUtils/MakeMaker.pm · Issue #843 · gugod/App-perlbrew Can't install Perls on brand new RHEL8 install on a new VM $ curl -L https://install.perlbrew.pl|bash $ source ~/perls/perlbrew/etc/bashrc $ perlbrew init $ perlbrew install --thread --multi --64in...

https://github.com/gugod/App-perlbrew/issues/843

來試着把 `ExtUtils::MakeMaker` 這個 dependency 拔掉好了。

#perlbrew
#coscup

0 0 1 0
Preview
App-perlbrew-1.02 Manage perl installations in your $HOME

https://metacpan.org/release/GUGOD/App-perlbrew-1.02

It's there, perlbrew 1.02.

#perl #cpan #perlbrew

0 0 0 0
Stop using your system Perl Recently, Gabor ran a poll in a Perl Facebook community asking which version of Perl people used in their production systems. The results were eye-opening—and not in a good way. A surprisingly large number of developers replied with something along the lines of _“whatever version is included with my OS.”_ If that’s you, this post is for you. I don’t say that to shame or scold—many of us started out this way. But if you’re serious about writing and running Perl in 2025, it’s time to stop relying on the system Perl. Let’s unpack why. * * * ## What is “System Perl”? When we talk about the _system Perl_ , we mean the version of Perl that comes pre-installed with your operating system—be it a Linux distro like Debian or CentOS, or even macOS. This is the version used by the OS itself for various internal tasks and scripts. It’s typically located in `/usr/bin/perl` and tied closely to system packages. It’s tempting to just use what’s already there. But that decision brings a lot of hidden baggage—and some very real risks. ### Which versions of Perl are officially supported? The Perl Core Support Policy states that only the **two most recent stable release series** of Perl are supported by the Perl development team [**Update:** fixed text in previous sentence]. As of mid-2025, that means: * Perl 5.40 (released May 2024) * Perl 5.38 (released July 2023) If you’re using anything older—like 5.36, 5.32, or 5.16—you’re outside the officially supported window. That means no guaranteed bug fixes, security patches, or compatibility updates from core CPAN tools like `ExtUtils::MakeMaker`, `Module::Build`, or `Test::More`. Using an old system Perl often means you’re **several versions behind** , and no one upstream is responsible for keeping that working anymore. * * * ## Why using System Perl is a problem ### 1. It’s often outdated System Perl is frozen in time—usually the version that was current when the OS release cycle began. Depending on your distro, that could mean Perl 5.10, 5.16, or 5.26—versions that are **years** behind the latest stable Perl (currently 5.40). This means you’re missing out on: * New language features (`builtin`, `class/method/field`, `signatures`, `try/catch`) * Performance improvements * Bug fixes * Critical security patches * Support: anything older than Perl 5.38 is no longer officially maintained by the core Perl team If you’ve ever looked at modern Perl documentation and found your code mysteriously breaking, chances are your system Perl is too old. ### 2. It’s not yours to mess with System Perl isn’t just a convenience—it’s a dependency. Your operating system relies on it for package management, system maintenance tasks, and assorted glue scripts. If you install or upgrade CPAN modules into the system Perl (especially with `cpan` or `cpanm` as root), you run the risk of breaking something your OS depends on. It’s a kind of dependency hell that’s completely avoidable—**if you stop using system Perl**. ### 3. It’s a barrier to portability and reproducibility When you use system Perl, your environment is essentially defined by your distro. That’s fine until you want to: * Move your application to another system * Run CI tests on a different platform * Upgrade your OS * Onboard a new developer You lose the ability to create predictable, portable environments. That’s not a luxury—**it’s a requirement for sane development** in modern software teams. * * * ## What you should be doing instead ### 1. Use `perlbrew` or `plenv` These tools let you install multiple versions of Perl in your home directory and switch between them easily. Want to test your code on Perl 5.32 and 5.40? `perlbrew` makes it a breeze. You get: * A clean separation from system Perl * The freedom to upgrade or downgrade at will * Zero risk of breaking your OS It takes minutes to set up and pays for itself tenfold in flexibility. ### 2. Use `local::lib` or `Carton` Managing CPAN dependencies globally is a recipe for pain. Instead, use: * `local::lib`: keeps modules in your home directory. * `Carton`: locks your CPAN dependencies (like `npm` or `pip`) so deployments are repeatable. Your production system should run with _exactly_ the same modules and versions as your dev environment. Carton helps you achieve that. ### 3. Consider Docker If you’re building larger apps or APIs, containerising your Perl environment ensures true consistency across dev, test, and production. You can even start _from_ a system Perl inside the container—as long as it’s isolated and under your control. You never want to be the person debugging a bug that _only happens on production_ , because prod is using the distro’s ancient Perl and no one can remember which CPAN modules got installed by hand. * * * ## The benefits of managing your own Perl Once you step away from the system Perl, you gain: * **Access to the full language.** Use the latest features without backports or compatibility hacks. * **Freedom from fear.** Install CPAN modules freely without the risk of breaking your OS. * **Portability.** Move projects between machines or teams with minimal friction. * **Better testing.** Easily test your code across multiple Perl versions. * **Security.** Stay up to date with patches and fixes on _your_ schedule, not the distro’s. * **Modern practices.** Align your Perl workflow with the kinds of practices standard in other languages (think `virtualenv`, `rbenv`, `nvm`, etc.). * * * ## “But it just works…” I know the argument. You’ve got a handful of scripts, or maybe a cron job or two, and they seem fine. Why bother with all this? Because “it just works” only holds true until: * You upgrade your OS and Perl changes under you. * A script stops working and you don’t know why. * You want to install a module and suddenly `apt` is yelling at you about conflicts. * You realise the module you need requires Perl 5.34, but your system has 5.16. Don’t wait for it to break. Get ahead of it. * * * ## The first step You don’t have to refactor your entire setup overnight. But you _can_ do this: * Install `perlbrew` and try it out. * Start a new project with `Carton` to lock dependencies. * Choose a current version of Perl and commit to using it moving forward. Once you’ve seen how smooth things can be with a clean, controlled Perl environment, you won’t want to go back. * * * ## TL;DR Your system Perl is for your operating system—not for your apps. Treat it as off-limits. Modern Perl deserves modern tools, and so do you. Take the first step. Your future self (and probably your ops team) will thank you. ### Share this: * Tweet * * Click to share on Reddit (Opens in new window) Reddit * More * * Click to email a link to a friend (Opens in new window) Email * Click to print (Opens in new window) Print * * Share on Tumblr * Pocket * * ### _Related_

Stop using your system Perl Recently, Gabor ran a poll in a Perl Facebook community asking which version of Perl people used in their production systems. The results were eye-opening—and not in a...

#Programming #carton #docker #perlbrew #system #perl

Origin | Interest | Match

1 0 0 0
Original post on g0v.social

github.com/gugod/App-perlbrew/actio...

Working on running simple end-to-end tests for #perlbrew that is just building #perl on commonly used Linux distributions.

Couldn't figure out why the test htmldir3.t failed only on #RockyLinux but not on other linux distributions […]

0 0 0 0

github.com/gugod/App-perlbrew/pull/...

#yamlscript#perlbrew 的一部分 CI workflow 檔案重新整理一下了。我覺得很好。

0 0 0 0
Original post on g0v.social

做 perlbrew 以來,一直覺得必須要提供夠充分的文件來給眾多指令提供說明。於是一開始就有做 `perlbrew help <CMD>` 這種方便讓人查 CMD 用法的 `help` 指令...

但都這麼多年了,今天我才發現 `help` 本身沒有文件。也就是 `perlbrew help help` 只會印出「找不到文件」。

這真是太糟糕了啊!

#perlbrew

( […]

0 0 0 0

https://hackmd.io/@gugod/rkPZyOotA#/

平平順順的講完了,很好!

#yapcjapan
#perlbrew

0 0 0 0

https://github.com/G4Vi/Perl-Dist-APPerl/releases

It seems trivial to let #perlbrew to support the installation of APPerl releases -- because it is trivial to install those release -- essentially you just `curl + chmod +x` !

0 0 0 0

perlbrew 1.00 is now on CPAN.

I've aggregate my thoughts and make a special note for this release.

https://perlbrew.pl/Perlbrew-1.00.html

This release is dedicated to #osdctw and will be briefly presented in YAPC::Hakotadate, tomorrow (2024/10/5).

#perlbrew
#yapcjapan

0 0 0 0
Post image Post image Post image Post image

#perlbrew mascots made by Bing Copilot (Dall-E 3)

太可愛了必須放進投影片理面

0 0 0 0