Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Returning to Perl after almost 3 decades

by talexb (Chancellor)
on Aug 15, 2024 at 02:26 UTC ( [id://11161107]=note: print w/replies, xml ) Need Help??


in reply to Returning to Perl after almost 3 decades

Well, for a language that everyone keeps saying is dead, there's been a lot of progress in 30 years. :D

For your questions,

  • Frameworks: there's Dancer2 and Mojolicious for web apps. I used CGI::Application probably 20 years ago, but it's been a while. And I still use Template::Toolkit for web pages -- see also their website. So handy.
  • Changes to the language itself: Well, there are lots, I guess. if I try to list all of them, there will be lots of posts adding, "Hey you forgot this other important thing" ..
    • You can use // as an or in an assignment, so you can write code like my $result = $this // $that // $the_other_thing;.
    • The default include search path @INC no longer includes the current directory ('.');
    • creating an object is done using my $cgi = CGI->new; now, and not my $cgi = new CGI;
    You should probably go read some of the perldeltas and get a better handle. Those are just the first few things that came to mind.
  • OO Perl: There's a new object model being added to Perl called Cor, and again, you should go read perldelta and maybe watch Ovid's presentations about this topic. The original way of creating objects is still around, as follows:
    sub new { my ( $class, $args ) = @_; my $self = { width => $args->{width} // DEFAULT_WIDTH, }; bless $self, $class; }
Welcome back!

Alex / talexb / Toronto

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

Replies are listed 'Best First'.
Re^2: Returning to Perl after almost 3 decades
by talexb (Chancellor) on Aug 15, 2024 at 05:30 UTC

    Latest perldelta (for Perl 5.40.0): here

    Alex / talexb / Toronto

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

Re^2: Returning to Perl after almost 3 decades
by DaWolf (Curate) on Aug 15, 2024 at 03:52 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11161107]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-10-09 00:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (44 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.