Previous Thread
Next Thread
Print Thread
Rate Thread
#102018 01/18/2001 11:25 AM
Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
Since you're using CGI.pm objects, I think it would be cleaner to have 'use CGI()' instead of 'use CGI qw(:standard)', to avoid unnecessary importing of names into the global namespace.

If you do that, 'print header' should be 'print $q->header()'.

It's also a good idea to turn on warnings, taint and strict modes:
#!/usr/bin/perl -wT
use strict;
use re 'taint'; # suppress implicit untainting by regexes

With strict mode on, all variables have to be declared:
my $q = new CGI;

After reading about possible ambiguities in accessing object methods, I've gotten in the habit of using this style when calling an object constructor:
my $q = CGI::->new();

If I'm wrong about any of these suggestions, please jump in and correct me [Linked Image]

This message has been edited by Dave_L on January 18, 2001 at 10:31 AM

Sponsored Links
Entire Thread
Subject Posted By Posted
Anything to improve? Em8 01/17/2001 11:53 PM
Re: Anything to improve? Dave_L 01/18/2001 6:25 PM
Re: Anything to improve? The Team 01/18/2001 7:12 PM
Re: Anything to improve? Greg Hard 01/19/2001 1:26 AM
Re: Anything to improve? Matt@ikonboard 01/19/2001 4:51 AM
Re: Anything to improve? Mark Badolato 01/19/2001 5:10 AM
Re: Anything to improve? Dominus 01/23/2001 9:02 AM
Re: Anything to improve? Dominus 01/23/2001 9:09 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 1880
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 29
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)