http://www.perlmonks.org?node_id=1197129


in reply to Re^2: RFC: pragma pragmatic
in thread RFC: pragma pragmatic

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^4: RFC: pragma pragmatic
by chromatic (Archbishop) on Aug 10, 2017 at 20:06 UTC
    To my way of thinking

    Your way of thinking is irrelevant, because it's not how Perl works.

    Other people have linked the relevant documentation. I wrote a book and give it away for free. (PragProg link for Modern Perl, 4e or online link to MP 4e).

    If that's too much of a burden for you, /msg me your address and I'll send you a paper copy.

    All of these resources are available. Please stop guessing and take the time to learn of what you speak. You're hurting yourself and you're hurting other people with your wild and uninformed speculation.

      save the postage costs, he won't read it. He doesn't read anything anyone tells him. Worst Nodes
Re^4: RFC: pragma pragmatic
by shmem (Chancellor) on Aug 10, 2017 at 08:47 UTC
    To my way of thinking, constructs such as use strict and use warnings are nothing more and nothing less than “ways to flip compiler-switches, which are considered only ‘at compile-time.’” They are strictly applied at compile time, to the limited extent that languages such as Perl possess a concept of “compile time,” and specifically do not influence the run-time behavior of the code.

    Wrong. The effect of warnings is at runtime. Would you please read just a tiny bit of the perl documentation? Read perlrun. It states:

    -c causes Perl to check the syntax of the program and then exit without executing it.

    So, no runtime with -c .

    #!/usr/bin/perl # line 1 w.pl use warnings; my $a; print $a;
    qwurx [shmem] ~> perl -c w.pl w.pl syntax OK

    No warning.

    qwurx [shmem] ~> perl w.pl Use of uninitialized value $a in print at w.pl line 4.

    Warning at runtime

    As for the rest of your post - it is completely ass-backwards. The "original programmer" of an arbitrary package can never know how and where his package is used. And if I use a package, I am free to use it in a way that suits me, and not the intentions of the "original programmer". I have to regard the intentions of the "original programmer", who instead completely ignores my intentions, and there is no way I can impose something upon them.

    To me, your idea introduces into the source-code many side-effects that are difficult if not impossible to discern from any simple reading of the source-code alone.

    This is plain FUD. Which side-effects? You can't tell because maybe you are unable to read the code, and too self-impressed by your imagined vast expertise, that you deem it unnecessary to read the documentation. Read perlpragma. Read perlrun, perlsub, perlmod. Then you can actually understand which side effects this pragmatic pragma has. And name them, substantiating your claim.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
Re^4: RFC: pragma pragmatic
by Your Mother (Archbishop) on Aug 10, 2017 at 01:34 UTC
    I am never the original programmer

    You have made us painfully, relentlessly aware of this fact. Perhaps it might add pause to the frequent offerings of expertise and advice on precisely the matters which bring programmers here.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^4: RFC: pragma pragmatic
by Anonymous Monk on Aug 11, 2017 at 10:19 UTC
    So "I'm here to keep talking crap even though I have no idea what I'm doing, and I'll just ignore whatever anyone else says?" - You're a broke record Mike.