4 ms·
Lots of us use Perl these days. For example those of us that care about speed, stability, and sane backwards compatibility. WWW::Mechanize is still a great to
by mock 17y ago
Lots of us use Perl these days. For example those of us that care about speed, stability, and sane backwards compatibility. WWW::Mechanize is still a great tool when appropriate. Catalyst and Moose are pretty awesome to work with as well. I'm pretty happy with the state of Perl these days, there are lots of reasons to recommend it, but if Python works for you, that's cool too.
Slightly more on topic - when Ovid first posted this to his feed, Stevan Little pointed out that you could already do it in Perl 5 ( http://gist.github.com/268717 http://gist.github.com/268717 ). Watching the give and take between the Perl 6 language and the Modern Perl movement is (I think) one of the more interesting and exciting areas of language development these days.
- draegtun 17y agoThanks for posting Stevan's gist... I hadn't seen that elsewhere. When I first saw Ovid's post I could see a MooseX::Declare lightbulb going off in my head ;-) use 5.010; use MooseX::Declare; class Foo { use MooseX::Types -declare => [ qw(Filename) ]; use MooseX::Types::Moose qw(Str); BEGIN { subtype Filename, as Str, where { -x $_ }; } method file ( Filename $name ) { say "Houston, we have a filename: $name"; } } my $foo = Foo->new; my $perl = `which perl`; chomp $perl; $foo->file( $perl ); $foo->file( 'no_such_file' ); Above throws the expected exeception on 'no_such_file'.
- jrockway 17y agoThis reminds me that it would be nice if someone wrote a module that produced type constraints like: File[Exists] File[Readable, Executable] Dir[Empty] as an extension to MooseX::Types::Path::Class.