Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anon hash ref treated as code block #192

Closed
thaljef opened this issue Nov 1, 2013 · 5 comments
Closed

anon hash ref treated as code block #192

thaljef opened this issue Nov 1, 2013 · 5 comments

Comments

@thaljef
Copy link
Member

thaljef commented Nov 1, 2013

RT Ticket: http://rt.cpan.org/Ticket/Display.html?id=36249
Requested On: Wed May 28 09:58:21 2008
Requested By: shafiek@is.co.za


$ perlcritic --Version
1.084

my $o = shift || {'file' => 1, 'exec' => 1};

yields

Comma used to separate statements ... (Severity: 4)

Shafiek Rasdien
Internet Solutions
Tel: +27 11 575 1000

@thaljef
Copy link
Member Author

thaljef commented Nov 1, 2013

RT Ticket: http://rt.cpan.org/Ticket/Display.html?id=36249
Comment On: 2008-05-28 22:33:51
Comment By: chris@chrisdolan.net


On May 28, 2008, at 11:58 AM, Shafiek Rasdien via RT wrote:

Wed May 28 12:58:27 2008: Request 36249 was acted upon.
Transaction: Ticket created by shafiek@is.co.za
Queue: Perl-Critic
Subject: anon hash ref treated as code block
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: shafiek@is.co.za
Status: new
Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=36249 >

$ perlcritic --Version
1.084

my $o = shift || {'file' => 1, 'exec' => 1};

yields

Comma used to separate statements ... (Severity: 4)

This looks like a bug in PPI. I don't have time to investigate right
now -- would someone be willing to re-file this as a PPI defect?

Chris

@moregan
Copy link
Contributor

moregan commented Feb 4, 2014

Submitted as PPI issue 34 Perl-Critic/PPI#34

@wchristian
Copy link
Member

A fix for this has been released as a dev version to CPAN. Please test and give feedback here:

Perl-Critic/PPI#92

thaljef added a commit that referenced this issue Nov 3, 2014
The parsing of hash constructors has been improved
in PPI and this bug is now fixed via Perl-Critic/PPI#92.
thaljef added a commit that referenced this issue Nov 3, 2014
The parsing of hash constructors has been improved
in PPI and this bug is now fixed via Perl-Critic/PPI#92.
@wchristian
Copy link
Member

The full version for this is now released to CPAN as 1.220.

@thaljef
Copy link
Member Author

thaljef commented Nov 11, 2014

This is fixed in Perl-Critic-1.123 via PPI-1.220

@thaljef thaljef closed this as completed Nov 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants