IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 24, 2004, 2:08:25 AM (22 years ago)
Author:
jhoblitt
Message:

misc clarifications

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/misc/perlCodeConventions.tex

    r2410 r2424  
    1 %%% $Id: perlCodeConventions.tex,v 1.32 2004-11-23 23:37:29 jhoblitt Exp $
     1%%% $Id: perlCodeConventions.tex,v 1.33 2004-11-24 12:08:25 jhoblitt Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    915915\subsection{When to Make Symbols Global}
    916916
    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}
     917Only declare variables as package variables (\code{our}) if they are intended
     918to be visible outside of the current namespace.  All other variables within a
     919namespace should be declared as lexical.
     920
     921\begin{verbatim}
     922    our $VERSION = '1.00';                  # Correct
     923
    922924    use base qw( Exporter );
    923925
    924     our @EXPORT_OK = qw( $foo $bar );
     926    our @EXPORT_OK = qw( $foo $bar );       # Correct
     927
     928    our $localCounter;                      # AVOID!
    925929\end{verbatim}
    926930
     
    11661170
    11671171\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
     1173to configure \code{perltidy} can be found in it's manpage\footnote{Perltidy
     1174manpage - http://perltidy.sourceforge.net/perltidy.html}
    11691175
    11701176Example \file{.perltidyrc} file to achieve the Perl code convention:
Note: See TracChangeset for help on using the changeset viewer.