News for hackers. Stuff that matters.

knightcrusader

Re:Perl 5.38 Released on Monday July 03, 2023 @08:41PM (#36580707)
I wouldn't say its "missing" named function arguments. Treating arguments and return values as lists is very powerful. Perl is very Lisp-like in that aspect.

Also, CPAN is considered one of Perl's strengths. How did CPAN cause Perl to burn out?

Re:Perl 5.38 Released on Monday July 03, 2023 @02:40PM (#36577171)
You saying nobody starting web dev should use CGI.pm? Or CGI in general? Because CGI itself has its uses even today. It's much easier to understand and get off the ground than something like Mojo or Plack (I've used them all), and has its strengths compared to the others.

However, if you are saying no one should use CGI.pm, then I agree. That module is a bloated mess. Much more efficient ways to use CGI without that thing.

Re:Perl 5.38 Released on Monday July 03, 2023 @01:28PM (#36576210)
I consider myself a serious Perl developer, working in a Perl shop for the past 15 years. We still prefer using bless and continue to use it in the present day. It so much lighter weight than the M* systems and I prefer the simplicity and speed of it.

All I need is magic structs with methods and that provides it. Throw in a constant array of properties and an AUTOLOAD, and you have accessors if you need it.

The only thing about the JSON package though, when things go wrong, it is very unhelpful about where it goes wrong.

I usually end up always wrapping the json_decode in an eval to catch the error and handle it in an easier to understand fashion.

But I agree though, its nice how json and perl data objects pretty much map to each other. It's great.

Re:The four noisy horsemen of Perl hate on Tuesday July 27, 2021 @01:31PM (#27975125)
Even easier than that:

  my $house = shift;
  my $color = shift // GetDefaultHouseColor();