Changeset 2464
- Timestamp:
- Nov 24, 2004, 3:51:32 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/misc/perlCodeConventions.tex (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/misc/perlCodeConventions.tex
r2424 r2464 1 %%% $Id: perlCodeConventions.tex,v 1.3 3 2004-11-24 12:08:25jhoblitt Exp $1 %%% $Id: perlCodeConventions.tex,v 1.34 2004-11-25 01:51:32 jhoblitt Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 1147 1147 \end{verbatim} 1148 1148 1149 \subsubsection{Inheritance} 1150 1151 Don't use the \code{@ISA} package variable for subclassing. Instead, use the 1152 \code{base} pragma. 1153 1154 \begin{verbatim} 1155 use base qw( Foo ); # Correct 1156 our @ISA = qw( Foo ); # AVOID! 1157 \end{verbatim} 1158 1159 \subsubsection{Calling Subroutines} 1160 1161 Do not use the \code{&} sigil to to disambiguate a subroutine from a 1162 ``bare-word''. Instead, use empty parentheses adjoined to the subroutine call. 1163 1164 \code{subs} pragma is a last resort. 1165 1166 \begin{verbatim} 1167 fooBar($foo); # Correct 1168 fooBar(); # Correct 1169 &fooBar; # AVOID! 1170 &fooBar(); # AVOID! 1171 use subs qw( fooBar ); # last resort - Correct 1172 \end{verbatim} 1173 1149 1174 %------------------------------------------------------------------------------ 1150 1175 \appendix %Begin Appendices
Note:
See TracChangeset
for help on using the changeset viewer.
