Skip Menu |
 

This queue is for tickets about the Devel-Declare CPAN distribution.

Report information
The Basics
Id: 39513
Status: rejected
Priority: 0/
Queue: Devel-Declare

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.002000
Fixed in: (no value)



Subject: Be aware of subroutine attributes.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 447
Download (untitled) / with headers
text/plain 447b
Devel::Declare doesn't appear to be aware of subroutine attributes. For example... package Foo; use Method::Signatures; method echo($arg) : Something { return $arg; } This is a syntax error. Not enough arguments for Stuff::method at t/attributes.t line 14, near "method :" syntax error at t/attributes.t line 14, near "method :" I think it's just that Devel::Declare puts the "sub" keyword just before the { rather than before the :.
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.6.HEAD-13825-1222102455-489.39513-4-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-39513 [...] rt.cpan.org> <rt-3.6.HEAD-13825-1222102455-489.39513-4-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id BEDBC4D8041 for <bug-Devel-Declare [...] rt.cpan.org>; Sat, 27 Sep 2008 12:47:55 -0400 (EDT)
Received: (qmail 6061 invoked from network); 27 Sep 2008 16:47:55 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 27 Sep 2008 16:47:55 -0000
Received: from de007061.idaq.com (HELO jules.scsys.co.uk) (217.168.153.160) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Sat, 27 Sep 2008 09:47:50 -0700
Received: from [217.168.150.167] (helo=agaton.scsys.co.uk) by jules.scsys.co.uk with esmtp (Exim 4.60) (envelope-from <matthewt [...] agaton.scsys.co.uk>) id 1KjcxO-0005Dq-1X for bug-Devel-Declare [...] rt.cpan.org; Sat, 27 Sep 2008 17:47:46 +0100
Received: from matthewt by agaton.scsys.co.uk with local (Exim 4.60) (envelope-from <matthewt [...] agaton.scsys.co.uk>) id 1KjcxN-0002ew-S0 for bug-Devel-Declare [...] rt.cpan.org; Sat, 27 Sep 2008 17:47:45 +0100
Delivered-To: cpan-bug+Devel-Declare [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #39513] Be aware of subroutine attributes.
User-Agent: Mutt/1.5.11
Return-Path: <matthewt [...] agaton.scsys.co.uk>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Devel-Declare [...] rt.cpan.org
Date: Sat, 27 Sep 2008 17:47:45 +0100
X-Spam-Level: *
Message-Id: <20080927164745.GU9470 [...] agaton.scsys.co.uk>
To: Michael G Schwern via RT <bug-Devel-Declare [...] rt.cpan.org>
From: Matt S Trout <mst [...] shadowcat.co.uk>
RT-Message-ID: <rt-3.6.HEAD-4393-1222534085-720.39513-0-0 [...] rt.cpan.org>
Content-Length: 1233
Download (untitled) / with headers
text/plain 1.2k
On Mon, Sep 22, 2008 at 12:54:39PM -0400, Michael G Schwern via RT wrote: Show quoted text
> Mon Sep 22 12:53:59 2008: Request 39513 was acted upon. > Transaction: Ticket created by MSCHWERN > Queue: Devel-Declare > Subject: Be aware of subroutine attributes. > Broken in: 0.002000 > Severity: Normal > Owner: Nobody > Requestors: mschwern@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=39513 > > > > Devel::Declare doesn't appear to be aware of subroutine attributes. For > example... > > package Foo; > > use Method::Signatures; > > method echo($arg) : Something { > return $arg; > } > > This is a syntax error.
so is sub method (&); method : Something { ... which is how you're doing it in Method::Signatures. Show quoted text
> I think it's just that Devel::Declare puts the "sub" keyword just before > the { rather than before the :.
We don't put one in at all. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
MIME-Version: 1.0
X-Mailer: MIME-tools 5.426 (Entity 5.426)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-4226-1223128905-1001.39513-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 154
Download (untitled) / with headers
text/plain 154b
Devel::Declare provides you with everything you need to handle attributes. MooseX::Method::Signatures uses toke_scan_word and toke_scan_str to parse them.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.