1PPIx::Regexp::Util(3) User Contributed Perl DocumentationPPIx::Regexp::Util(3)
2
3
4
6 PPIx::Regexp::Util - Utility functions for PPIx::Regexp;
7
9 use PPIx::Regexp::Util qw{ __instance };
10 .
11 .
12 .
13 __instance( $foo, 'Bar' )
14 or die '$foo is not a Bar';
15
17 This module contains utility functions for PPIx::Regexp which it is
18 convenient to centralize.
19
20 The contents of this module are private to the PPIx::Regexp package.
21 This documentation is provided for the author's convenience only.
22 Anything in this module is subject to change without notice. Caveat
23 user.
24
25 This module exports nothing by default.
26
28 This module can export the following subroutines:
29
30 __instance
31 __instance( $foo, 'Bar' )
32 and print '$foo isa Bar', "\n";
33
34 This subroutine returns true if its first argument is an instance of
35 the class specified by its second argument. Unlike "UNIVERSAL::isa",
36 the result is always false unless the first argument is a reference.
37
39 Params::Util, which I recommend, but in the case of "PPIx::Regexp" I
40 did not want to introduce a dependency on an XS module when all I
41 really wanted was the function of that module's "_INSTANCE()"
42 subroutine.
43
45 Support is by the author. Please file bug reports at
46 <http://rt.cpan.org>, or in electronic mail to the author.
47
49 Thomas R. Wyant, III wyant at cpan dot org
50
52 Copyright (C) 2010-2013 by Thomas R. Wyant, III
53
54 This program is free software; you can redistribute it and/or modify it
55 under the same terms as Perl 5.10.0. For more details, see the full
56 text of the licenses in the directory LICENSES.
57
58 This program is distributed in the hope that it will be useful, but
59 without any warranty; without even the implied warranty of
60 merchantability or fitness for a particular purpose.
61
62
63
64perl v5.16.3 2014-06-10 PPIx::Regexp::Util(3)