<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:foaf="https://xmlns.com/foaf/0.1/" xmlns:og="https://ogp.me/ns#" xmlns:rdfs="https://www.w3.org/2000/01/rdf-schema#" xmlns:schema="https://schema.org/" xmlns:sioc="https://rdfs.org/sioc/ns#" xmlns:sioct="https://rdfs.org/sioc/types#" xmlns:skos="https://www.w3.org/2004/02/skos/core#" xmlns:xsd="https://www.w3.org/2001/XMLSchema#" version="2.0" xml:base="https://www.linuxjournal.com/tag/perl">
  <channel>
    <title>Perl</title>
    <link>https://www.linuxjournal.com/tag/perl</link>
    <description/>
    <language>en</language>
    
    <item>
  <title>Removing Duplicate PATH Entries, Part II: the Rise of Perl</title>
  <link>https://www.linuxjournal.com/content/removing-duplicate-path-entries-2-rise-perl</link>
  <description>  &lt;div data-history-node-id="1340333" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/bash-icon_3.png" width="600" height="600" alt="bash" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/mitch-frazier" lang="" about="https://www.linuxjournal.com/users/mitch-frazier" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Mitch Frazier&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt; &lt;/p&gt;
&lt;p&gt;With apologies to &lt;a class="reference external" href="https://www.imdb.com/title/tt0181852/"&gt;Arnold and the Terminator franchise&lt;/a&gt; for the title, let's look one more time at removing duplicates from the PATH variable. This take on doing it was prompted by a comment from a reader named Shaun on the &lt;a class="reference external" href="https://www.linuxjournal.com/content/removing-duplicate-path-entries"&gt;previous post&lt;/a&gt; that asked "if you're willing to use a non-bash solution (AWK) to solve the problem, why not use Perl?" Shaun was kind enough to provide a Perl version of the code, which was good, since I'd have been hard-pressed to come up with one. It's a short piece of code, shorter than the AWK version, so it seemed like it ought to be fairly easy to pick it apart. In the end, I'm not sure I'd call it easy, but it was interesting, and I thought other non-Perl programmers might find it interesting too.&lt;/p&gt;
&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/removing-duplicate-path-entries-2-rise-perl" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 04 Dec 2018 12:30:00 +0000</pubDate>
    <dc:creator>Mitch Frazier</dc:creator>
    <guid isPermaLink="false">1340333 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Moose</title>
  <link>https://www.linuxjournal.com/content/moose</link>
  <description>  &lt;div data-history-node-id="1029712" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/moose.png" width="200" height="187" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/henry-van-styn" lang="" about="https://www.linuxjournal.com/users/henry-van-styn" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Henry Van Styn&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
Perl has been around for more than 20 years. During that time, it has received
its share of both praise and criticism, and lots of
misconceptions surround it. Much of this stems from long-outdated
notions of what Perl used to be, but have nothing to do with what Perl
actually is today.
&lt;/p&gt;

&lt;p&gt;
Perl hasn't been
standing still. It's been growing continuously and evolving, and that
growth has accelerated dramatically in the past few years. Moose is one of
the technologies at the heart of this "Perl Renaissance", which also
includes other exciting projects that have emerged, such as Catalyst and
DBIx::Class.
&lt;/p&gt;

&lt;p&gt;
Moose is essentially a language extension for Perl 5 that provides a
modern, elegant, fully featured object system. I say "language
extension",
but Moose is written in pure Perl, and as you'll see, its syntax is still
normal Perl. You don't need to patch Perl itself to use Moose; under the
hood, it's just Perl 5.
&lt;/p&gt;

&lt;p&gt;
Because Moose is still just Perl 5, it's fully compatible with all of those
wonderful modules on CPAN, regardless of whether they are written in
Moose (and most aren't, as CPAN has been around for so long, and Moose
is relatively new).
&lt;/p&gt;

&lt;p&gt;
For me, this is still the single biggest reason to choose Perl. Whatever 
you are trying to accomplish, chances are, there already is a refined
module for it on CPAN. This usually means dramatic cuts in total
development time, because someone else already has written a lot of your
program for you.
&lt;/p&gt;

&lt;p&gt;
And now, with all the modern object-oriented features Moose brings to
Perl, you get to
have your cake and eat it too. 
&lt;/p&gt;

&lt;p&gt;
In this article, I provide an introduction to object-oriented programming in
Moose and cover some of Moose's core features with useful examples.
To get the most out of this article, you already should be familiar with
object-oriented programming concepts, such as classes, objects, methods,
attributes, construction and inheritance.
&lt;/p&gt;

&lt;p&gt;
You also need to know Perl—at least the fundamentals. If you don't know
Perl, learning it is not very hard to do. At the end of the
day, it's just syntax. The good news is you don't need to master Perl by
any stretch to start using Moose. 
&lt;/p&gt;

&lt;p&gt;
Perl does have its quirks, and Moose doesn't make them all totally go away
(and you wouldn't want them all to go away, because a lot of them are really
useful). The most important concepts to understand are how Perl references
work (the "perlreftut" tutorial is a great place to
start—see Resources),
and also the basics of working with Scalars, Arrays and Hashes. Also, learn
what the fat comma is (=&gt;) if you aren't already familiar with it. Moose
makes heavy use of it as an idiom. It's actually not that scary; it's
interchangeable with the normal comma (,). 
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/moose" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Mon, 23 Jan 2012 15:00:00 +0000</pubDate>
    <dc:creator>Henry Van Styn</dc:creator>
    <guid isPermaLink="false">1029712 at https://www.linuxjournal.com</guid>
    </item>

  </channel>
</rss>
