books
Free Books / Computers / Practical mod_perl /

previous page: 22.3.6. Global symbol "$foo" requires explicit package name
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 22.3.8. Undefined subroutine &Apache::ROOT::perl::test_2epl::some_function called at

22.3.7. Use of uninitialized value at (eval 80) line 12




Description

This section is from the "Practical mod_perl" book, by Stas Bekman and Eric Cholet. Also available from Amazon: Practical mod_perl

If you see this message, your code includes an undefined variable that you have used as if it was already defined and initialized. For example:

my $param = $q->param('test');
print $param;

You can fix this fairly painlessly by just specifying a default value:

my $param = $q->param('test') || '';
print $param;

In the second case, $param will always be defined, either with $q->param('test')'s return value or the default value the empty string ('' in our example).

 

Continue to:

  • prev: 22.3.6. Global symbol "$foo" requires explicit package name
  • Table of Contents
  • next: 22.3.8. Undefined subroutine &Apache::ROOT::perl::test_2epl::some_function called at

Books by Stas Bekman:















TOP
previous page: 22.3.6. Global symbol "$foo" requires explicit package name
  
page up: Practical mod_perl | by Stas Bekman and Eric Cholet
  
next page: 22.3.8. Undefined subroutine &Apache::ROOT::perl::test_2epl::some_function called at

Topics

  • Animals
  • Architecture
  • Arts
  • Business
  • Computers
  • Crafts
  • Fairy Tales
  • Finance
  • Flora and Plants
  • Cooking
  • Gardening
  • Health and Healing
  • History
  • Home Improvements
  • Languages
  • New Age
  • Novels
  • Real Estate
  • Reference
  • Religion
  • Science
  • Society
  • Sports
  • Travel
  • Outdoors


Search

My Books

Headaches Begone! A Systemic Approach To Healing Your Headaches
Don't Let Your Bike Seat Ruin Your Sex Life Book

Discover

  • Answers FAQ

[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007-2021 StasoSphere.com