On Sat, Jan 8, 2011 at 3:50 PM, Moritz Lenz wrote:
> class MyMatcher {
>for -> $field {
>MyMatcher.^add_method($field, method() {
> self!matches($field);
>}
>);
>}
> }
>
> The .^ means a method of the metaclass is called, here add_method
>
> M
On 01/08/2011 09:11 PM, Sean McAfee wrote:
> package MyMatcher;
>
> my @SIMPLE_FIELDS = qw(FOO BAR BAZ BLETCH QUUX ...);
>
> for my $field (@SIMPLE_FIELDS) {
> no strict 'refs';
> *{ "is_\L$field" } = sub { shift->_matches($field) };
> }
>
class MyMatcher {
for -> $field {
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #81982]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=81982 >
rakudo: my &r = &return; sub f { &return := -> $v { say
"LOL!"; &r($v) }; return(42) };
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #81974]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=81974 >
rakudo: (0, {last if $^a==$^b; (1..5).pick} ... *).perl.say
rakudo e7e9d5: OUTPUT«Meth
Hello--
I recently wrote some Perl 5 code similar to the following, and I'm
wondering what might be the analogous construction in Perl 6:
package MyMatcher;
my @SIMPLE_FIELDS = qw(FOO BAR BAZ BLETCH QUUX ...);
for my $field (@SIMPLE_FIELDS) {
no strict 'refs';
*{ "is_\L$field" } = sub {
On Sat, 2011-08-01 at 09:44 -0800, Isaac Gouy wrote:
> > I will try to see if there's any more sane way to do this
>
>
> http://alioth.debian.org/scm/viewvc.php/shootout/bench/?root=shootout
Thank you very much. Trying CVS was on my list of things to do but that
will save me some time (and it w
Hello,
Inspired by reading S22 draft, I started building some new module
infrastructure for the Perl 6 ecosystem, described briefly in [1].
To cut the long story short, it allows to easily collect the metadata of
all the modules in the ecosystem, like versions, dependencies etc
without neceserilly