mas.to is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hello! mas.to is a fast, up-to-date and fun Mastodon server.

Administered by:

Server stats:

12K
active users

#perl

30 posts27 participants5 posts today

I can't really figure this one out, please help.

I have a whole bunch of modules that layer on each other and I decided to try to use Mojo::Promise to go async. After running into issues I tried to mock some code on the command line and both M:P and Future do the same in that the inner "then"s do not seem to do anything.

```
sub outer{my $p=inner()->then(sub{say "o"}); $p}
sub inner{my $p=Mojo::Promise->new->then(sub{say "i"});$p->timer(1); $p}
outer->wait();
```

prints o only.

@manwar 's post in last year’s #Perl Advent Calendar about his Map::Tube module intrigued me. I decided I wanted to build a map for the tram network where I live: Hannover. Along the way, I decided to write up how to create a Map::Tube map for one’s city of interest. Since I enjoy explaining things in detail, this got … long. So I broke it up into parts.

This is the first post in a five-part series about how to create Map::Tube maps. Enjoy!

peateasea.de/building-map-tube

P.T.C. · Building Map::Tube::<*> maps, a HOWTO: first stepsMohammad Sajid Anwar’s post in last year’s Perl Advent Calendar about his Map::Tube module intrigued me. I decided I wanted to build such a map for the tram network in the city where I live: Hannover, Germany. Along the way, I thought it’d be nice to have a detailed HOWTO explaining the steps needed to create a Map::Tube map for one’s city of interest. Since I enjoy explaining things in detail, this got … long. So I broke it up into parts.

About 25 years ago, I disliked that so many Debian tools were written in Perl because the language allowed too many ways to do the same thing. Now, I consider Perl 5 mature and predictable compared to Python 3.

#Perl @PerlWChallenge 317 Task 2: Friendly Strings
#noxp
```
perl -E '
($p,$q)=@ARGV; @p=split "",$p; @q=split "",$q; $p[$_]eq$q[$_]||++$d for(0..@p-1);($r,$s)=
map{join "",sort{$a cmp $b}@$_}([@p],[@q]); say "@ARGV -> ", $r eq $s && $d==2?"True":"False";
' desc dsec
```

#Perl @PerlWChallenge 317 Task 1: Acronyms
#noxp
```
perl -E '
$x=shift; $y=join "",map{substr $_,0,1}@ARGV; say "W=$x, L=@ARGV -> ", $x eq $y?"True":"False";
' PWC Perl Weekly Challenge
```

⚠️ Alerte sécurité #Perl – CVE-2024-56406

Si vous avez une solution ou un site exposé sur Internet avec Perl (v5.34 à v5.40), prenez 1 min pour lire ceci
⬇️
Une faille heap buffer overflow dans l’opérateur tr/// permet de planter Perl via une simple ligne de code :
⬇️

perl -e '$_ = "\x{FF}" x 1000000; tr/\xFF/\x{100}/;'

➡️ Risque d'attaque opportuniste par déni de service

🎯 Possiblement à risque si exposés:

  • Portails d'hébergements mutualisés

  • Scripts Perl manipulant des entrées utilisateur

  • Stacks locales (ex : XAMPP)

🔒 Pour se protéger :

Mettez à jour en 5.40.2 ( metacpan.org/release/SHAY/perl) ou 5.38.4 (metacpan.org/release/SHAY/perl)

cPanel
⬇️
docs.cpanel.net/changelogs/110

MetaCPANperldeltawhat is new for perl v5.40.2
The Perl 5 Porters have released #Perl versions 5.40.2 and 5.38.4 to address CVE-2024-56406. It is believed that this #security #vulnerability can enable Denial of Service or Arbitrary Code Execution attacks on platforms that lack sufficient defenses.

You can soon download both from your favorite #CPAN mirror or find them at:

https://metacpan.org/release/SHAY/perl-5.40.2/

https://metacpan.org/release/SHAY/perl-5.38.4/

Changes are listed in their respective “perldelta” documents:

https://metacpan.org/release/SHAY/perl-5.40.2/view/pod/perldelta.pod

https://metacpan.org/release/SHAY/perl-5.38.4/view/pod/perldelta.pod
MetaCPANperl-5.40.2The Perl 5 language interpreter
Replied in thread

@brainblasted agree with Rust, #Perl 🧅& Python🐍 are equal in quality & older.

I do wish #Rust had the #Python tutorial.

Up to date and covers the basics with the latest version. This point is so important, have correct usable documentation at each release. No half completed information allowed. 🐍<docs.python.org/3/tutorial/ind>

Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax an...
Python documentationThe Python TutorialPython is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax an...