Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a require statement with strict?

Status
Not open for further replies.

rdyoll

Technical User
Aug 11, 2003
39
US
Hi, I recently decided to add a configuration companion file to be "required" in one of my scripts. After doing so, I noticed that it wouldn't run using strict mode. Is this the nature of "strict", or can anyone point out what I am doing wrong?
thanx,

rdyoll
 
What's the "require" line and what's the error?

----------------------------------------------------------------------------------
...but I'm just a C man trying to see the light
 
Make sure that everything in your require files is strict as well.

This means every variable has to have a 'my' or 'local' declaration etc etc.

When you require you are importing all those symbols into your existing namespace. If that space is declared strict and your require does not obey you will get these errors.
 
I'm sorry for the premature post. Everything is just fine. I can only suspect that when testing on my localhost, browser caching was deceiving me. Since this was the first time I had attempted to use a "require"...I guess I freaked.
Sorry and thank you... nonetheless, at the same time.
[sadeyes]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top