On Thu, Sep 10, 2009 at 8:58 AM, John Carter <[email protected]> wrote:
> On Thu, 10 Sep 2009, Kent Fredric wrote:
>
> I've been toting a Little-Brittain esque "I'm the only Perl user in
>> my village" line on the various IRC networks for a while now, and I
>> figure it a good time to see if that claim is a valid one.
>>
>
> I used perl for years in a previous life... but found it was a
> maintenance nightmare.
>
> So I moved to Ruby a few years ago and I'm never going back.
>
> Do yourself a favour and move too.
>
> Sort of like "There was one other Perl user in the village, but he/she
> changed sex and now won't speak to me." :-)
>
>
>
Oh noes. =)
Granted some of the older perl is a bit nasty. But things are changing
muchly of late.
For instance, this is valid Perl, no source filters!
----
use 5.010;
use MooseX::Declare;
class OtherClass {
has 'attribute' => (
isa => 'Str',
required => 1,
is => 'rw',
);
method otherClass ( Int $foo ) {
print $self->attribute . $foo;
}
}
role Squashable {
requires 'squash';
method do_squash {
$self->squash;
}
}
class Example extends OtherClass with Squashable {
method squash ( ) {
say "Squashed";
}
}
my $i = Example->new( attribute => "Hello" );
$i->do_squash; # prints 'Squashed';
$i->otherClass(1); # prints 'Hello' ;
$->otherClass("World"); # Validation failure, world is not an Int.
--------
So... not even Bi-Curious?
( I have my own reservations about ruby, it shall be interesting when the
majority of projects using it are not new code, but the maintenance of
existing code, I have used it, and am relatively well versed in it, but
these days Perl is *more* fun :D. )
>
>
> John Carter Phone : (64)(3) 358 6639
> Tait Electronics Fax : (64)(3) 359 4632
> PO Box 1645 Christchurch Email : [email protected]
> New Zealand
>
>
--
Kent
perl -e "print substr( \"edrgmaM SPA nocomil.i...@tfrken\", \$_ * 3, 3 )
for ( 9,8,0,7,1,6,5,4,3,2 );"
http://kent-fredric.fox.geek.nz