Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maybe u know this bug, maybe not ;) -w undeclare var #980

Closed
p5pRT opened this issue Dec 20, 1999 · 1 comment
Closed

maybe u know this bug, maybe not ;) -w undeclare var #980

p5pRT opened this issue Dec 20, 1999 · 1 comment

Comments

@p5pRT
Copy link

p5pRT commented Dec 20, 1999

Migrated from rt.perl.org#1928 (status was 'resolved')

Searchable as RT1928$

@p5pRT
Copy link
Author

p5pRT commented Dec 20, 1999

From ditiemef@hven.com.ve

I didn't try it on my linux box yet, i saw the problem in windows 98.
the perl -v gives me​:
Version​: 5.004_02

I split the bug in Introduction, Origin, Consequence

[Introduction]
I really, really, really hate the trash of perl when i write
html, well, just to do more easy for me that, i wrote a loop
to create a var for eachlink i may use.

[Origin]
This code will create a link for any language,
language+tool, and language+tool+toolsubs
for example if i have the language sp, and the
tool ms and the mssubs 'agr','pre','ver'. The
code will give a link for the sub
'sp','spms','spmspre','spmsver','spmsagr'
called $'A+subname'
<--- Start Code ---->
#
$cgi = "/cgi-bin/dmoz/dte.cgi";
@​languages = ('sp','en');
@​tools = ('ms');
@​mssubs = ('agr','pre','ver');
foreach $lang (@​languages){
  my ($link) = "A" . $lang;
  ${A$link} = "<A HREF=\"${cgi}\?op=${lang}\">";
  foreach $tool (@​tools){
  my ($link) = $link.$tool;
  ${$link} = "<A HREF=\"${cgi}\?op=${lang}${tool}\">";
  $toolsubs = $tool."subs";
  if (@​${toolsubs}){
  foreach $subs (@​${toolsubs}){
  my ($link) = $link.$subs;
  ${$link} =
  "<A HREF=\"${cgi}\?op=${lang}${tool}${subs}\">";
  }
  }
  }
}
<--- End of perl code -->
Then when i need to call a link to a sub trough
"op=sub_name", for example, if i need the link
to 'en', i'll use​: $Aen .

[Consequence]
When you run the -w switch one of the checks are if there is a
variable used only once, i'm not a guru of programming and i
don't know how it checks but when i run it on my windoz box
over the cgi with the above code, the perl daemon said​:
Name "main​::_each_var_declared_by_my_code" used only once​:
possible typo at det.cgi line... .

I guess that it's a bug, what do u think?, please tell me.

greets.

enan0
--
"Cuz they didn't know that was impossible, they did it!"
-= RareGaZz =- http​://raregazz.acapulco.uagro.mx
,.·' Hven '·., http​://www.hven.com.ve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant