Rob, Great going, you are adding the 'use strict;' pragma to your code.! Bravo. Now, here is the deal. Tell Perl that 'br' is a function by doing either '&br' or 'br();'. That should do the trick. You'll notice that all of your other functions have parenthesis. That is why you are not getting the bareword warning on them.
Kristofer --- Rob Richardson <[EMAIL PROTECTED]> wrote: > Greetings! > > I am attempting to use objects to organize a program > somewheat > intelligently. I am running into a problem using > the CGI method "br". > > My main routine has the following use statements: > > use CGI::Carp qw(fatalsToBrowser); > use CGI qw/:standard center *big delete_all/; > > It begins writing HTML with the following code: > > print > header(-type=>'text/html',-expires=>'-1d'), > start_html(-title=>'Volunteer Scheduling > System',-vlink=>'blue'), > center(p(img({-src=>'cvsr.gif'}),br,strong("Welcome > to the Volunteer > Scheduling System $usrvals[1] $usrvals[3]."),br, > <snip> > > There is no problem with this statement. Note that > the CGI method "br" > was used twice. (At least I think that's what "br" > is here.) > > > In a new module that I wrote, I have the following > use statement: > > use CGI qw/:standard center *big delete_all *br/; > > This module defines an object that knows how to > build an HTML string. > It has a GetHTML() method that returns a string, and > it's the > responsibility of the calling routine to send that > string to standard > output to build the web page. The GetHTML() routine > uses the following > code to build a string: > > $htmlString = p > ( > center > ( > strong > ( > "Train(s) and positions for the day you have > selected." > ) . > br . > "Click the position you would like to volunteer > for." . > br . > "Positions that are already taken cannot be > clicked." . > br . > "Use the date dropdowns above to change to a > different day." > ) > ) . > br . > "<TABLE align=center><TR>"; > > In this instance, Perl is complaining that the > bareword "br" is not > allowed when "strict subs" is in use. I don't > understand why it's not > allowed here but it is allowed in the other module. > Can somebody > please explain this? > > Thanks very much! > > RobR > > > __________________________________ > Do you Yahoo!? > Yahoo! Calendar - Free online calendar with sync to > Outlook(TM). > http://calendar.yahoo.com > > -- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > ===== -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GIT d s+:++ a C++ UL++ US+ P+++ L++ W+++ w PS PE t++ b+ G e r+++ z++++ ------END GEEK CODE BLOCK------ __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]