NAME
Perl::Critic::PPIx::Utilities::Statement - Utility functions for dealing with PPI statement objects.
DESCRIPTION
Provides classification of PPI::Elements.
INTERFACE SUPPORT
This is considered to be a public module. Any changes to its interface will go through a deprecation cycle.
IMPORTABLE SUBS
get_constant_name_elements_from_declaring_statement($statement)
-
Given a PPI::Statement, if the statement is a
use constant
or Readonly declaration statement, return the names of the things being defined. If called in scalar context, return the number of names defined.Given
use constant 1.16 FOO => 'bar';
this will return ("FOO"). Given
use constant 1.16 { FOO => 'bar', 'BAZ' => 'burfle' };
this will return ("FOO", "BAZ"). Similarly, given
Readonly::Hash my %FOO => ( bar => 'baz' );
this will return ("%FOO").
AUTHOR
Thomas R. Wyant, III wyant at cpan dot org
COPYRIGHT
Copyright (c) 2009-2010 Thomas R. Wyant, III. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module.