Changeset 2424
- Timestamp:
- Nov 24, 2004, 2:08:25 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/misc/perlCodeConventions.tex (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/misc/perlCodeConventions.tex
r2410 r2424 1 %%% $Id: perlCodeConventions.tex,v 1.3 2 2004-11-23 23:37:29jhoblitt Exp $1 %%% $Id: perlCodeConventions.tex,v 1.33 2004-11-24 12:08:25 jhoblitt Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 915 915 \subsection{When to Make Symbols Global} 916 916 917 Only declare variables as package variables (\code{our}) if they are going to 918 be exported into another namespace. All other variables within a namespace 919 should be declared as lexical. 920 921 \begin{verbatim} 917 Only declare variables as package variables (\code{our}) if they are intended 918 to be visible outside of the current namespace. All other variables within a 919 namespace should be declared as lexical. 920 921 \begin{verbatim} 922 our $VERSION = '1.00'; # Correct 923 922 924 use base qw( Exporter ); 923 925 924 our @EXPORT_OK = qw( $foo $bar ); 926 our @EXPORT_OK = qw( $foo $bar ); # Correct 927 928 our $localCounter; # AVOID! 925 929 \end{verbatim} 926 930 … … 1166 1170 1167 1171 \code{pertidy} can be configured with either command line switches or a 1168 \file{.perltidyrc} file in your home directory. 1172 \file{.perltidyrc} file in your home directory. Detailed instructions on how 1173 to configure \code{perltidy} can be found in it's manpage\footnote{Perltidy 1174 manpage - http://perltidy.sourceforge.net/perltidy.html} 1169 1175 1170 1176 Example \file{.perltidyrc} file to achieve the Perl code convention:
Note:
See TracChangeset
for help on using the changeset viewer.
