.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Perl::Critic::Policy::Compatibility::Gtk2Constants 3pm" .TH Perl::Critic::Policy::Compatibility::Gtk2Constants 3pm "2018-05-30" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Perl::Critic::Policy::Compatibility::Gtk2Constants \- new enough Gtk2 version for its constants .SH "DESCRIPTION" .IX Header "DESCRIPTION" This policy is part of the \f(CW\*(C`Perl::Critic::Pulp\*(C'\fR add-on. It requires that if you use certain constant subs from \&\f(CW\*(C`Gtk2\*(C'\fR and \f(CW\*(C`Glib\*(C'\fR then you must explicitly have a \f(CW\*(C`use\*(C'\fR of a high enough version of those modules. .PP .Vb 2 \& use Gtk2 1.160; \& ... return Gtk2::EVENT_PROPAGATE; # bad \& \& use Gtk2 1.200 \*(Aq:constants\*(Aq; \& ... return GDK_CURRENT_TIME; # good .Ve .PP The following \f(CW\*(C`Gtk2\*(C'\fR constants are checked, .PP .Vb 4 \& GTK_PRIORITY_RESIZE # new in Gtk2 1.200 (devel 1.190) \& GDK_PRIORITY_EVENTS \& GDK_PRIORITY_REDRAW \& GDK_CURRENT_TIME \& \& EVENT_PROPAGATE # new in Gtk2 1.220 (devel 1.210) \& EVENT_STOP \& \& GTK_PATH_PRIO_LOWEST # new in Gtk2 1.220 (devel 1.211) \& GTK_PATH_PRIO_GTK \& GTK_PATH_PRIO_APPLICATION \& GTK_PATH_PRIO_THEME \& GTK_PATH_PRIO_RC \& GTK_PATH_PRIO_HIGHEST .Ve .PP and the following \f(CW\*(C`Glib\*(C'\fR constants .PP .Vb 2 \& SOURCE_CONTINUE # new in Glib 1.220 (devel 1.210) \& SOURCE_REMOVE .Ve .PP The idea is to keep you from using the constants without a new enough \&\f(CW\*(C`Gtk2\*(C'\fR or \f(CW\*(C`Glib\*(C'\fR. Of course there's a huge number of other things you might do that also require a new enough version, but these constants tripped me up a few times. .PP The exact version numbers above and demanded are development versions. You're probably best off rounding up to a \*(L"stable\*(R" one like 1.200 or 1.220. .PP As always if you don't care about this and in particular if for instance you only ever use Gtk2 1.220 or higher anyway then you can disable \&\f(CW\*(C`Gtk2Constants\*(C'\fR from your \fI.perlcriticrc\fR in the usual way (see \&\*(L"\s-1CONFIGURATION\*(R"\s0 in Perl::Critic), .PP .Vb 1 \& [\-Compatibility::Gtk2Constants] .Ve .SS "Constant Forms" .IX Subsection "Constant Forms" Constants are recognised as any of for instance .PP .Vb 5 \& EVENT_PROPAGATE \& Gtk2::EVENT_PROPAGATE \& Gtk2\->EVENT_PROPAGATE \& &EVENT_PROPAGATE \& &Gtk2::EVENT_PROPAGATE .Ve .PP When there's a class name given it's checked, so that other uses of say \&\f(CW\*(C`EVENT_PROPAGATE\*(C'\fR aren't picked up. .PP .Vb 3 \& Some::Other::Thing::EVENT_PROPAGATE # ok \& Some::Other::Thing\->EVENT_PROPAGATE # ok \& &Some::Other::Thing::EVENT_PROPAGATE # ok .Ve .PP When there's no class name, then it's only assumed to be Gtk2 or Glib when the respective module has been included. .PP .Vb 2 \& use Something::Else; \& EVENT_PROPAGATE # ok \& \& use Gtk2 \*(Aq:constants\*(Aq; \& EVENT_PROPAGATE # bad .Ve .PP In the latter form there's no check for \f(CW\*(C`:constants\*(C'\fR or explicit import in the \f(CW\*(C`use\*(C'\fR, it's assumed that if you've used Gtk2 then \f(CW\*(C`EVENT_PROPAGATE\*(C'\fR means that one no matter how the imports might be arranged. .SH "SEE ALSO" .IX Header "SEE ALSO" Perl::Critic::Pulp, Perl::Critic, Gtk2, Glib .SH "HOME PAGE" .IX Header "HOME PAGE" .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Kevin Ryde .PP Perl-Critic-Pulp is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. .PP Perl-Critic-Pulp is distributed in the hope that it will be useful, but \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with Perl-Critic-Pulp. If not, see .