ovid, to random
@ovid@fosstodon.org avatar

Hey, #perl devs. Do you use DBIx::Class::Schema::Loader? Do you also use Perl::Tidy? You can get disappointed if Perl::Tidy reformats the dbic files, so drop this in your .perltidyrc to stop that:

Ignore DBIC-generated content

--format-skipping-begin='#(<<<| DO NOT MODIFY THE FIRST PART OF THIS FILE)'
--format-skipping-end='#(>>>| DO NOT MODIFY THIS OR ANYTHING ABOVE!)'

tripleo, to random
@tripleo@fosstodon.org avatar

All you nutcases still using #Perl, what's actually wrong with it?

aka What are the sharp edges?

leonerd,
@leonerd@fosstodon.org avatar

@tripleo If you want decent integration with 3rd party stuff (google APIs, amazon, etc...) you may need to write your own client stuff as most big service providers seem to have forgotten that #Perl exists

mjgardner, (edited )
@mjgardner@social.sdf.org avatar

@tripleo #Perl’s “sharp edges” are mainly early syntax and features that later experience with large and networked #programming found dangerous, but are preserved for backward (and we do mean “backward”) compatibility.

See the details of the strict and warnings pragmas, and successively missing items in feature bundles:

https://perldoc.perl.org/strict
https://perldoc.perl.org/warnings
https://perldoc.perl.org/feature#FEATURE-BUNDLES

And the summary of policies included in #PerlCritic: https://MetaCPAN.org/pod/Perl::Critic::PolicySummary

ovid, to Lisp
@ovid@fosstodon.org avatar

, , and are three powerful programming languages that share a common feature.

Nobody knows how the hell to capitalize them.

RogerBW, to raku
@RogerBW@emacs.ch avatar
ovid, to random
@ovid@fosstodon.org avatar

If any gurus want to take a look at a small bug in some code I wrote, I'd appreciate it. https://github.com/Ovid/unset-vars/issues/1

oalders, to programming
@oalders@fosstodon.org avatar

I'm handling sponsorships for this year's Perl and Raku Conference. Please share this far and wide so that we can get as many new sponsors as possible. ❤️

https://www.perl.com/article/this-is-your-opportunity-to-sponsor-the-perl-and-raku-conference-2024/

#perl @perl @tag@relay.fedi.buzz #programming

sjn,
@sjn@chaos.social avatar

@oalders @perl @tag@relay.fedi.buzz

Everyone! If your #business depends on #Perl or #RakuLang please consider supporting the communities you rely on!

One good way to ensure a sustainable future for #OpenSource ecosystems like these, is to support active and fertile venues for learning and teaching these technologies.

Right now, you can help by supporting the Perl and Raku Conference, and later this year, the London Perl Workshop.

Is this relevant for you? Forward it to your manager! 💯

ovid, to random
@ovid@fosstodon.org avatar

#Copilot just wrote the following #Perl code for me, complete with the comment, which is correct.

my $UNINIT = bless => {}, 'Uninitialized::Vars::Variable';
sub uninit () { $UNINIT }
sub is_uninit ($var) { $var == $UNINIT } # XXX: This is wrong

charadon, to random
@charadon@8bit.red avatar

So, I know it's sacrilege to make your own "Build System", but for fun, I decided to give it a go.

It's made up of 3 scripts:

  • build.pl: Builds the project
  • clean.pl: Cleans up artifacts
  • install.pl: Installs artifacts where they need to go in the system.

build.pl was the most complicated, but that's not saying much, it was incredibly easy to make and it's small. It even supports parallel jobs and not rebuilding an object if the source file is older than the object.

Serpent7776, to random
@Serpent7776@mastodon.social avatar

I just wasted 1hr, because I used == instead of eq and 'and' instead of && in

mjgardner,
@mjgardner@social.sdf.org avatar

@Serpent7776 use warnings; (or the -w switch for a one-line command) would have helped catch the first problem: https://perldoc.perl.org/warnings

You would then see “Argument "foo" isn't numeric in numeric eq (==)” along with the line number in the code and the string you were trying to compare instead of “foo”: https://perldoc.perl.org/perldiag#Argument-%22%25s%22-isn't-numeric%25s

If you have 2022’s version 5.36 or later, use v5.36; will enable warnings as well as other sane defaults.

/ @perl

mjgardner, (edited )
@mjgardner@social.sdf.org avatar

@Serpent7776 I’m sorry to hear about the warnings lost in the output.

Since you’ve got v5.38.2, write use v5.38; and in addition to strict and warnings you enable the following niceties from https://perldoc.perl.org/feature :

bitwise
current_sub
evalbytes
fc
isa
module_true
postderef_qq
say
signatures
state
unicode_eval
unicode_strings

You’ll also disable these footgun “features”:

bareword_filehandles
indirect
multidimensional
switch

Give it a whirl!

/ @perl

RogerBW, to raku
@RogerBW@emacs.ch avatar
mjgardner, to perl
@mjgardner@social.sdf.org avatar

@perl Remember folks, 's is a dromedary 🐪, not a Bactrian 🐫:

perl -CS -pe 's/\N{BACTRIAN CAMEL}/\N{DROMEDARY CAMEL}/gu'  
metacpan, to programming
@metacpan@fosstodon.org avatar
dave, to random
@dave@puz.fun avatar

Anyone here have experience updating a Dockerized Perl application? Specifically I am looking for help upgrading the app from 5.26 to 5.30 and how to rectify errors where some libraries (I think?) were built for Perl 5.26 and won't work under 5.30?

#Perl #ModernPerl #PerlDev #Docker #Perl5

philsplace, to random
@philsplace@mastodon.sdf.org avatar

Dropping some Perl right in the middle of some Template::Toolkit code is the best thing about TT

mjgardner,
@mjgardner@social.sdf.org avatar

@philsplace
@perl “[ languages have] two problems: First, their little language is crippled. If you need to do something the author hasn't thought of, you lose. Second: Who wants to learn another language? You already know , so why not use it?“

Cut out the middleman and use Text::Template: https://metacpan.org/pod/Text::Template

RL_Dane, to raku
@RL_Dane@fosstodon.org avatar

Lol, and folks, I made a funny (in bash!)

#!/usr/bin/env bash

CD - uses my ulocate script and fzf to jump to any directory found within my home directory

set -u undeclared variables as errors

function warn {
echo "$" >&2
}
function swoon { # (something in between a warn and a die ;)
warn "$
"
exit 0
}
function die {
warn "$*"
exit 1
}

ferki, to KindActions
@ferki@fosstodon.org avatar

perlthanks is a shortcut for perlbug -T to "send a thank-you note instead of a bug report".

With , is a feature.

See the docs: https://perldoc.perl.org/perlthanks#Can-you-use-perlbug-to-submit-a-thank-you-note

RogerBW, to raku
@RogerBW@emacs.ch avatar
benjamineskola, to random
@benjamineskola@hachyderm.io avatar

Started reading ‘Modern Perl’ on the train to work the other day. was the first programming language I learned, 20 years ago now, but I’ve hardly used it in probably 15 years now.

Not yet sure what I’d use it for, though. Better shell scripts? I’d normally choose Python/Ruby for that.

profoundlynerdy,
@profoundlynerdy@bitbang.social avatar

@benjamineskola There is a very new OOP system: https://ovid.github.io/articles/the-future-of-perl.html which looks good but I haven't actually used it myself.

I work Cybersecurity, I mostly use for quick one-off scans when someone asks me, "are we vulnerable to XYZ?" when XYZ has a (mis)configuration element to it.

A lot of my hobby code is using these days as I really enjoy the language's mutability.

ChristosArgyrop, to hpc
@ChristosArgyrop@mstdn.science avatar

One of the mainstream testing systems for high performance computing is written in @Perl

https://sourceforge.net/projects/ctsproject/

mjgardner, (edited )
@mjgardner@social.sdf.org avatar

@deflarerOfClouds #GitHub has hosted #PerlTidy development for a long time. Please continue to file bug reports there: https://GitHub.com/perltidy/perltidy/issues

You might even consider making a reasonable case to move the project’s remaining assets off #SourceForge. Impotently whinging about it here doesn’t change anything.

/ @ChristosArgyrop @ovid @perl #Perl

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • magazineikmin
  • Youngstown
  • osvaldo12
  • khanakhh
  • slotface
  • tacticalgear
  • InstantRegret
  • ngwrru68w68
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • everett
  • rosin
  • JUstTest
  • Durango
  • GTA5RPClips
  • ethstaker
  • modclub
  • mdbf
  • cisconetworking
  • Leos
  • normalnudes
  • cubers
  • megavids
  • tester
  • anitta
  • lostlight
  • All magazines