Skip to content

Instantly share code, notes, and snippets.

@pdcawley
Created August 10, 2009 11:14

Revisions

  1. pdcawley created this gist Aug 10, 2009.
    17 changes: 17 additions & 0 deletions gistfile1.pl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    #!/usr/bin/perl

    use feature ':5.10';
    use MooseX::Declare;

    class Foo {
    method _test { 1 }

    method bar ( $f where { _test(')}') } ) {
    $f
    }
    }

    say Foo->new->bar('22');

    # Blows up with:
    # Runaway '{}' in parameter near '{ _test(')}')' at /usr/local/share/perl/5.10.0/MooseX/Method/Signatures/Meta/Method.pm line 160