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

#34 -- Constructor not block #36

Merged
merged 3 commits into from
Nov 1, 2014

Conversation

moregan
Copy link
Collaborator

@moregan moregan commented Feb 7, 2014

Adds to the lexer's list of operators that if they appear before curly braces imply that be braces are a hash constructor, not a code block. Resolves issues with PPI reported in Perl::Critic tickets:

Perl-Critic/Perl-Critic#192 -- "my $o = shift || {'file' => 1, 'exec' => 1};" "||" was added to operators that imply hash constructor, and by extension so were "&&", "//", "||=", "&&=", and "//=".

Perl-Critic/Perl-Critic#390 -- $condition ? { a=>1 } : { b=>1}

@moregan
Copy link
Collaborator Author

moregan commented Aug 28, 2014

Addresses Perl::Critic issue Perl-Critic/Perl-Critic#590

@wchristian wchristian merged commit 52b5619 into Perl-Critic:master Nov 1, 2014
@wchristian
Copy link
Member

This is fairly straightforward, to be included in the next release.

@wchristian wchristian added this to the 1.219 milestone Nov 1, 2014
@moregan moregan deleted the constructor-not-block branch November 11, 2014 21:47
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

Successfully merging this pull request may close these issues.

2 participants