Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Automatic reminder to use strict in new SoPW posts...

by    (Sexton)
on Feb 03, 2002 at 13:52 UTC ( #143057=note: print w/replies, xml ) Need Help??


in reply to Automatic reminder to use strict in new SoPW posts...

If it's going to be read, it will have to be unavoidable.

I'd say that to make it efficient, there has to be JavaScript executed when the users submits the form. This JS will have to check the textarea field and look for the words use strict;. This can be done using the JS version of regexes. (Yes, they exist, for those of you that didn't believe so. Not as powerful as Perl regexes, but they do exist.)
If the use strict; is missing in the textarea, then a JS confirm() with an appropriate message shall be shown to the user, including the option to submit anyway or to cancel the submission.

Then it would at least stand a chance to be read.

Now, with the general (lack of) appreciation for JS at the Monastery, this may not be an option. But there's a (the?) solution.

The white hole.

P.S. <OPINION> JavaScript does have it's uses.</OPINION>

Replies are listed 'Best First'.
Re: Re: Automatic reminder to use strict in new SoPW posts...
by $code or die (Deacon) on Feb 03, 2002 at 21:48 UTC

    Not all SOPW posts are the kinds of posts that require the use of "use strict;". Some posts don't include <CODE> at all. So I think this would be a bad idea.

    "Seekers of Perl Wisdom" != "What's wrong with this code"

    If I post a regex, for example, that's failing match a given text, my use of strict or not is irrelevant.

    Personally, I would support a c.l.p.m.-style FAQ that is emailed to a New User when they sign up. Something that gives all the necessary info like "How to post a question", "Where to post a question", etc. Of course, this doesn't guarantee that it will be read. But we can't force annoying popup windows on people.

    ___ Simon Flack ($code or die)
    $,=reverse'"ro_';s,$,\$,;s,$,lc ref sub{},e;$,
    =~y'_"' ';eval"die";print $_,lc substr$@,0,3;
      I realise I ask many more questions than I do give responses, but on this one I feel the need to give my humble opinion. I support the idea of a FAQ sent at registration time. I feel it would have saved me much time, and quite a bit of embarassment here had things like "use strict" before submitting a question. Thanks for hearing me out. :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-01-24 07:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (64 votes). Check out past polls.

    Notices?