perl glue usage style question

Jonathan Vanasco <[email protected]>
Newsgroups gmane.comp.apache.apreq
Message-ID <[email protected]>
this is a style question for using the perl glue, purely stylistic -  
just wondering what the accepted standard is in terms of accessing a  
param within a single cgi script

ie: access the param via $libapreq every time, or pull 1x, then use  
repeatedly

this is a halfassed illustration below showing some exceedingly poor  
design ideas.  just trying to show exxagerated scenarios.


case a:
	sub aa {
		if ( $request->param('a') eq 'b' ){
			do_stuff( $request->param('a') );
		}
		more_stuff( $request->param('a') );
		other_stuff( $request->param('a') );
		different_stuff();
	}
	sub different_stuff{
		if ( $request->param('a') eq 'b' ){
		}
	}

case b:
	sub aa {
		if ( $a eq 'b' ){
			do_stuff( $a );
		}
		more_stuff( $a );
		other_stuff( $a );
		different_stuff();
	}
	sub different_stuff{
		if ( $request->param('a') eq 'b' ){ # or rewrite to accept $a as an  
arg like the others
		}
	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.