Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Tidy-Sweetened CPAN distribution.

Report information
The Basics
Id: 94633
Status: resolved
Priority: 0/
Queue: Perl-Tidy-Sweetened

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

Bug Information
Severity: (no value)
Broken in: 0.23
Fixed in: (no value)



Subject: class WORD::WORD { not supported

At present, it appears that:

class FOO::BAR {

}

is parsed as

class FOO  ::BAR {

}

and translated to

 

package Foo ::Bar  {
}


And that additional whitespace results in an error

--[ Sample Failure Code ]--
use strict;
use warnings;
use utf8;

use MooseX::Declare;

class A {

}

class B::Suffix {

}

class C::Double::Suffix {

}

-- [ Error output ]--
16:    Unexpected ':' after package name 'package B'

20: package C ::Double::Suffix { #__CLASS 2
    ^                                      
found package where operator expected

Missing ';' above?
20:    Unexpected ':' after package name 'package C'


This fails it seems, due to

q[:] not matching \w
 

I've uploaded a new version (0.24) to CPAN that allows identifiers to include double colons. Thanks for the bug report.