Don't think you understand the question. On small scripts performance is poor so I want to know whether its worth using in a proper project.

Not sure if the balance between performance and syntactic sugar is worth it.

Moose

$cat test_moose.pl package NumberHolder; use Moose; has 'x' => (is => 'rw', isa => 'Int'); has 'y' => (is => 'rw', isa => 'Int'); __PACKAGE__->meta->make_immutable; package Main; my $z = NumberHolder->new(x => 1, y => 2); print "z's x and y = ", $z->x()," ", $z->y(), "\n"; $time perl test_moose.pl z's x and y = 1 2 real 0m1.48s user 0m1.06s sys 0m0.11s

No Moose

$cat test_nomoose.pl package NumberRun; sub new { my $class = shift; my %args = @_; my %h = ( x => 0, y => 0); @h{ keys %args} = values %args; return bless \%h; } sub x { my $self = shift; $self->{x} = shift if @_; $self->{x}; } sub y { my $self = shift; $self->{y} = shift if @_; $self->{y}; } 1; package Main; use strict; use warnings; my $z = NumberRun->new(x => 1, y => 2); print "z's x and y = ", $z->x()," ", $z->y(), "\n"; $time perl test_nomoose.pl z's x and y = 1 2 real 0m0.07s user 0m0.01s sys 0m0.01s

In reply to Re^2: Moose performance by Anonymous Monk
in thread Moose performance by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.