CONTENTS

NAME

PPIx::Utils::Language - Utility functions for PPI related to the Perl language

SYNOPSIS

use PPIx::Utils::Language ':all';

DESCRIPTION

This package is a component of PPIx::Utils that contains functions related to aspects of the Perl language.

FUNCTIONS

All functions can be imported by name, or with the tag :all.

precedence_of

my $precedence = precedence_of($element);

Given a PPI::Token::Operator or a string, returns the precedence of the operator, where 1 is the highest precedence. Returns undef if the precedence can't be determined (which is usually because it is not an operator).

symbol_without_sigil

my $name = symbol_without_sigil($symbol);

Returns the name of the specified symbol with any sigil at the front. The parameter can be a vanilla Perl string or a PPI::Element.

BUGS

Report any issues on the public bugtracker.

AUTHOR

Dan Book <dbook@cpan.org>

Code originally from Perl::Critic::Utils by Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> and Perl::Critic::Utils::Perl by Elliot Shank <perl@galumph.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2005-2011 Imaginative Software Systems, 2007-2011 Elliot Shank, 2017 Dan Book.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

SEE ALSO

Perl::Critic::Utils, Perl::Critic::Utils::Perl