Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Perl Monks Discussion

( #1040=superdoc: print w/replies, xml ) Need Help??

Do not post your Perl questions here!

This section is only for discussing issues pertaining to the PerlMonks web site itself. For example, asking about how things work, or offering ideas on how the site could be made better.

Unless the topic pertains to the PerlMonks web site itself, it does not belong in this section. If you're even the least bit unsure, check out Where should I post X? and The Perl Monks Guide to the Monastery, or ask in the chatterbox.

PerlMonks Discussions
Hex codes in links
1 direct reply — Read more / Contribute
by jo37
on Jun 21, 2020 at 10:02

    The node 11118252 has a "special" link that contains a vertical bar (encoded as %7C). This link has been constructed by specifying the full href, as choroba told me in a private message. As the vertical bar cannot be used directly in a link at the monastery as it separates the location from the displayed text, it must be encoded in some way. Trying to use the path IO::Uncompress::Gunzip#Transparent-=>-0%7C1 with some shortcut schemas gives interesting results:

    [metamod://IO::Uncompress::Gunzip#Transparent-=>-0%7C1] ->
    points to nowhere (404)

    [doc://IO::Uncompress::Gunzip#Transparent-=>-0%7C1] ->
    links to the page, but not to the specified section

    [mod://IO::Uncompress::Gunzip#Transparent-=>-0%7C1] ->
    links to the specified section

    <EDIT> and work just fine, when accessed with the original path component "as is". The example is misleading, as there are no anchors within the page. </EDIT>

    All the generated links (except the full href) have one thing in common: The percent sign becomes encoded as %25. It depends on the target side if this will be interpreted in a useful way. I didn't find any documentation on how to include a hex encoded value in a link. Obviously it is handled different in a full href. Is this a bug or is it a feature? If it's a feature, then another feature might be missing: including hex codes in a path.


[Solved] Node renders differently when logged in vs. logged out
2 direct replies — Read more / Contribute
by haukex
on Jun 20, 2020 at 12:57

    Update: This paragraph is a test to see if I can reproduce it. italic ... Yep, confirmed.

    Solution: "Enforce proper nesting of HTML" in Display Settings. D'oh!

    The node 11115734 contains an unclosed <i> in the "EDIT" at the top. However, the HTML for this node differs depending on whether I am logged in vs. logged out. When logged in, it's

    <p> <b>EDIT:</b> <br /> I <strike>use</strike> <i>used</i> bareword filehandles. <i>In the course of this discussion I was convinced not to do so.<i> </i></i></p>

    But when logged out, it's

    <p> <b>EDIT:</b> <br /> I <strike>use</strike> <i>used</i> bareword filehandles. <i>In the course of this discussion I was convinced not to do so.<i> </p>

    What's going on? Of course the "fix" is to correct the unclosed <i>, but I'm surprised at the rendering difference.

On my way out?
7 direct replies — Read more / Contribute
by stevieb
on May 28, 2020 at 20:29

    After my Raspberry Pi stuff I did for a couple of years, I've migrated away from SBC and now focus primarily on micro controllers to perform actions I need done.

    I haven't had the 'need' for Perl in some time. Realistically, I'm only checking PerlMonks because it's a habit. I also still use Perl for quick one-off basic math and localized problems.

    Other than that, being an ardent Perl user for a couple of decades, I'm finding my desire waning quite quickly. I don't really have the excitement I once held for Perl, nor is the community the same as it was years ago.

    I am uncertain as to the future I have with Perl. I know I love Perl to death, but death does not sustain future generations.

    I'm starting to think that Perl has been fractured to the point that it's been bypassed, and unless someone comes up with some magical cure to phase in some niche for it, maybe we need to retire.

    Flustered and aggrieved I am as we all are, and even though I make money because of Perl, Perl might not be the best recommendation going forward.

    As always, opinions welcome.

Strange Reputation Display
3 direct replies — Read more / Contribute
by kcott
on May 28, 2020 at 02:44

    In "Re^4: one liner error" I see:

    Reputation: -12 (+-2 -10)

    The "+-2" seemed very strange and I'm pretty sure I haven't seen that in the past. I reloaded that page a couple of times but the "+-2" persisted.

    I checked another from today's Worst Nodes. In "Re^2: delete single user" I see:

    Reputation: -12 (+0 -12)

    That looks normal. Any ideas on that first one with "+-2"?

    — Ken

Ethical considerations of responding to posts made by someone obviously up to no good
7 direct replies — Read more / Contribute
by kikuchiyo
on May 26, 2020 at 13:27

    This question was prompted by the following node: json no reload

    Its author has repeatedly made low quality posts with an obvious lack of ability or intent to learn anything, expecting us to give him ready-to-use solutions to help him in his nefarious endavors. To put it bluntly, the poster is likely a scammer or script kiddie, except he keeps tripping up in his own shoelaces and he is too retarded to notice even that.

    What is the right thing to do with posts like this, given that replying to them is at best a waste of time, but at worst might lead to other, innocent people being hurt?

    1. ignore completely
    2. delete and ban
    3. try to educate the poster
    4. give a malicious answer that hurts the scammer if he is dumb enough to blindly run code from the internet
    5. report to the authorities

    Ignoring or deleting seems like avoiding responsibility, like saying "it's not my problem".

    Educating doesn't seem to work - now, nor in general.

    As for giving a fake answer, I've once read a chatlog where an angry and overconfident kid wanted to hack his neighbor's wi-fi, and someone convinced him to run yes I want to enable wireless hacking > /dev/sda as root on his (or as it turned out, his father's) computer - which is both evil and hilarious. In any case, this is a dangerous option.

    Reporting makes me feel like a snitch - but at the same time, if there is evidence for a crime, I (we) have a moral or even legal obligation to report it.

Intermittent server errors
No replies — Read more | Post response
by hippo
on May 26, 2020 at 07:31

    Over the past week or so I have noticed very occasionally that a page or an asset has not rendered in response to a request. choroba has also mentioned in the CB seeing this or something similar. Just now this has happened fortuitously while I had the network console running in my browser and it reports these problems:

    A 500 response when attempting to retrieve from the server at at 11:16:54 GMT (Response header timestamp).

    A 500 response when attempting to retrieve replies toggle javascript from the same server at the same time.

    The 2 assets were then immediately re-requested by the browser and successfully served by that same server with the same timestamps.

    I hope that this helps in tracking down the problem.

Adding details with summary html tags
4 direct replies — Read more / Contribute
by Lady_Aleena
on May 22, 2020 at 14:23

    I was wondering if <details> with <summary> could be added as acceptable html here in PerlMonks. Those tags could be used when code or data examples are more than 10 or so lines. <readmore> is great for keeping long batches of code or data from the main list of posts, however, long batches of code might do well if kept in a <details> tag where the code or data can be hidden to keep page lengths from being over long upon initial load. So what do you all think?

    My OS is Debian 10 (Buster); my perl version is 5.28.1.

    No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
    Lady Aleena
Low volume on the Gates these days
3 direct replies — Read more / Contribute
by ForgotPasswordAgain
on May 15, 2020 at 22:22
    Hello, hope your mask is securely in place on your face. I noticed that there are fewer Monastery Gates posts in the last few days. I'm not complaining, but how can I help increase the Gates-posts, if possible?
Unable to approve #11116576
1 direct reply — Read more / Contribute
by kcott
on May 08, 2020 at 18:33

    I've been unable to approve "[OT] Am I just a bad programmer?" [#11116576] — I tried a few times. The same problem was noted by davies: see the update to his "Re: [OT] Am I just a bad programmer?" response.

    Looking at the moderation and janitation histories, two things happened at the same time ("2020-05-08 21:42" in my timezone):

    • The post was moved from SOPW to Meditations.
    • The post was approved (apparently in SOPW section).

    We've previously seen this situation where a move and a subsequent approval were registered in the database out of order. I suspect this node is approved in SOPW so further attempts to approve it are ignored; however, as it's actually in Meditations, it's showing as unapproved in that section.

    In the past, this has needed senior moderator intervention to fix. I've no idea of the exact cabal/level/other requirements.

    — Ken

[Free Nodelet Hack] CodeMirror
No replies — Read more | Post response
by haukex
on May 03, 2020 at 05:48

    You need to be logged in, then enable the Free Nodelet in your Nodelet Settings, turn on the option "Code Wrapping Off" in your Display Settings, and in your Free Nodelet Settings, paste the following, and all textareas and code blocks will become CodeMirror editors with syntax highlighting, line numbers, etc. For code blocks, the syntax highlighter is Perl (which doesn't appear to mess up the syntax highlighting on non-Perl source too much), and for text areas, the syntax highlighting is HTML, with support for JavaScript in <script> tags and CSS in <style> tags, as well as for Perl in <c> tags (not <code> tags for now, because those are actually valid HTML5 tags; I'm open for suggestions otherwise).

    <link rel="stylesheet" href=" +demirror/5.53.2/codemirror.min.css" integrity="sha256-vZ3SaLOjnKO/gGvcUWegySoDU6ff33CS5i9ot8J9Czk=" cros +sorigin="anonymous" /> <script src=" +codemirror.min.js" integrity="sha256-sRwcFCKzBvYiAJfddXlx1Ld5+hAxpYzCM+drX/GHMKE=" cros +sorigin="anonymous"></script> <script src=" +mode/xml/xml.min.js" integrity="sha256-Lfk8z6WUsBN6YiCaMpH6bxBHyRqkPK4O2QbQHFNUS40=" cros +sorigin="anonymous"></script> <script src=" +mode/javascript/javascript.min.js" integrity="sha256-tnhIfKT2keR1i4Y7lQL70BBfwnxp10ywUpnXjSjIlH4=" cros +sorigin="anonymous"></script> <script src=" +mode/css/css.min.js" integrity="sha256-Np6VKUByekB6pozOOgM2TcmhyGX46hnWr9TpJbUXpyo=" cros +sorigin="anonymous"></script> <script src=" +mode/htmlmixed/htmlmixed.min.js" integrity="sha256-9Dta/idKg17o/o0a3PEsL6JjkYvijj9UMh3Z86HhUcg=" cros +sorigin="anonymous"></script> <script src=" +mode/perl/perl.min.js" integrity="sha256-fQeGcgwNMEHlEqr9CCAoDsorVyJXm1mDMq1E/rB1wiQ=" cros +sorigin="anonymous"></script> <script src="" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script> <script src="/?node_id=11116375;displaytype=displaycode;part=2" type="text/javascript"></script>

    (If you've already got jQuery loaded from another nodelet hack, you don't need to put that <script> tag twice, of course.)

    Note: If something goes wrong in your browser, and suddenly the text areas break, you need to disable JavaScript to be able to edit your Free Nodelet to disable this hack. And of course let me know, with OS and browser version, and best would be the error messages from your browser's JS console too.

    Since this code isn't particularly long, if you'd like to customize any of the CodeMirror settings (like indentation), you can also copy the below code into your Free Nodelet directly (inside <script> tags, and omit the final <script> tag above).

    There is support for CodeMirror Themes: add the desired stylesheet to the Free Nodelet (e.g. <link rel="stylesheet" href="" integrity="sha256-kRDm75ZpAk6HEGxwszCLc7vt79azRsrfybbL4llVXBw=" crossorigin="anonymous" />) and then add <script> CM_THEME="lesser-dark"; </script>.

[Free Nodelet Hack] AJAX Chatterbox
2 direct replies — Read more / Contribute
by haukex
on May 02, 2020 at 18:44

    You need to be logged in, then enable the Chatterbox and the Free Nodelet in your Nodelet Settings, and in your Free Nodelet Settings, paste the following, and you get a chatterbox that refreshes itself dynamically, with optional browser notifications! Sending messages also works without reloading the entire page. It now also refreshes the "Other Users" nodelet and the Chatterbox regularly.

    Since it was a little quiet in the Monastery when I implemented this, it's currently not 100% tested yet, let me know if you have any issues. (Update: So far, so good...)

    <script src="" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script> <script src="/?node_id=11116369;displaytype=displaycode;part=2" type="text/javascript"></script>

    (If you've already got jQuery loaded from another nodelet hack, you don't need to put that <script> tag twice, of course.)

    If you don't want the AJAX CB enabled by default, then put this before the above <script> tags: "<script> AJAXCB_DEFAULTOFF=true; </script>".

XML Generator ticker=yes only works sporadically? (updated)
1 direct reply — Read more / Contribute
by haukex
on May 02, 2020 at 10:43
[Free Nodelet Hack] Browser Notifications for New Nodes
No replies — Read more | Post response
by haukex
on May 02, 2020 at 10:35

    You need to be logged in, then enable the Free Nodelet in your Nodelet Settings, and in your Free Nodelet Settings, paste the following, and on supported browsers you'll get a checkbox "☐ New Node Notifications" above your nodelets that you can turn on, and you'll get a browser notification for each new node that is posted.

    <script src="" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script> <script src="/?displaytype=displaycode;node_id=11116359;part=2" type="text/javascript"></script>

    (If you've already got jQuery loaded from another nodelet hack, you don't need to put that <script> tag twice, of course.)

    The notifications are disabled by default because if you have multiple tabs open to PerlMonks, you'd get a notification per tab. If you want to have notifications turned on by default, you can add this before the above <script> tags: "<script> NOTIFICATIONS_ENABLE=true; </script>", and if you additionally want to hide the checkbox, add "NOTIFICATIONS_HIDECB=true;" inside those <script> tags.

VPN Usage
1 direct reply — Read more / Contribute
by freonpsandoz
on Apr 26, 2020 at 19:01

    Does the Perl Monks site forbid VPN usage? When I tried to post a reply in a forum, I got the error message, "You do not have permission to post. Tough beans." The error went away when I disconnected from my VPN. Thanks.

Janitation History vs. Poster History
1 direct reply — Read more / Contribute
by kcott
on Mar 06, 2020 at 19:59

    G'day All,

    I was looking at a node which I thought may have been modified by the poster. I wondered if Janitation History would enlighten me. It didn't: "This node has not been edited yet.".

    Just to confirm that, I checked "Re: how to write a vertical TK Entry?". I had fixed a minor typo in that: s/wigdet/widget/. Again, Janitation History reports: "This node has not been edited yet.".

    I wasn't really expecting Janitation History to report on poster edits; however, I thought it was worth checking. It's often useful to know if a poster has made modifications, especially when subsequent posts by others don't seem to make sense.

    I'll just throw this open for general discussion:

    • Would a new Poster History link be useful to others?
    • What about a combined Janitation History and Poster History (possibly renamed to something like Edit History)?
    • Are there any technical issues with doing this (e.g. increased database load)?
    • Is there another way to get this information of which I'm unaware?

    — Ken

Discussion Item
Give us your input:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (5)
    As of 2020-11-27 14:22 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found