Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: How to import "global" variables into sub-scripts from main script? (Cargo culting red flags)

by Polyglot (Friar)
on Mar 22, 2021 at 11:41 UTC ( #11130108=note: print w/replies, xml ) Need Help??


in reply to Re: How to import "global" variables into sub-scripts from main script? (Cargo culting red flags)
in thread How to import "global" variables into sub-scripts from main script?

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re^2: How to import "global" variables into sub-scripts from main script? (Cargo culting red flags)

Replies are listed 'Best First'.
Re^3: How to import "global" variables into sub-scripts from main script? (Cargo culting red flags)
by 1nickt (Abbot) on Mar 22, 2021 at 11:56 UTC

    There is no "cult of strict". There is just a safety mechanism which you obdurately choose to ignore at your peril. Your design and programming practices are horrible and the fact that you cannot run under strict proves it. There is no virtue in driving without a safety belt because there is "more than one way to do it."


    The way forward always starts with a minimal test.
Re^3: How to import "global" variables into sub-scripts from main script? (Cargo culting red flags)
by hippo (Chancellor) on Mar 22, 2021 at 12:03 UTC
    I refuse to become part of the cult of strict

    I note from your OP that you also refuse to become part of the cult of placeholders.


    🦛

      I don't know what placeholders are outside of math and linguistics--so I don't know what you may have found to critique. I guess it would be difficult to join a cult one has never encountered. Again, I'm not a trained programmer. Everything I know about perl I've learned in a hands-on, self-taught manner. I know I'm not very good. But better to split the wood with the claws of the hammer than to sit idly by, sighing for want of a maul.

      Blessings,

      ~Polyglot~

Re^3: How to import "global" variables into sub-scripts from main script? (Cargo culting red flags)
by Anonymous Monk on Mar 22, 2021 at 12:49 UTC
Re^3: How to import "global" variables into sub-scripts from main script? (Cargo culting red flags)
by Anonymous Monk on Mar 22, 2021 at 13:03 UTC
    Right after shooting yourself in the foot might not be the right time to advocate leaving the saftey off.

      Perhaps not. But it's too late to loose the safety after one has already been out drawn.

      In any case, removing strict clears up the issue for me entirely: No error messages in the logs, NO problems with the script running, no indication of any trouble at all. Simply adding use strict; to that file shuts everything down to the point of one of these beauties:

      Internal Server Error The server encountered an internal error or misconfiguration and was u +nable to complete your request. Please contact the server administrator at webmaster@[redacted].com to + inform them of the time this error occurred, and the actions you per +formed just before this error. More information about this error may be available in the server error + log.

      I haven't been able to verify that "strict" is giving only warnings. It is actually throwing a kill switch for me--and my script presently runs fine without it.

      Blessings,

      ~Polyglot~

        Perl without strict is another language.

        I'm afraid, you won't get much support for that one here.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        Yes, putting a screwdriver through your check engine light is one way to get it to turn off.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11130108]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2021-09-26 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?