Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

The Monastery Gates

( [id://131]=superdoc: print w/replies, xml ) Need Help??

If you're new here please read PerlMonks FAQ
and Create a new user.

Quests
Wall of Larry Quest
Starts at: Feb 26, 2024 at 05:00
Ends at: Dec 31, 2024 at 04:59
Current Status: Active
2 replies by jdporter

    By now you've all seen The St. Larry Wall Shrine. Well, it could use a fresh coat of gold leaf and shellac. Therefore, we are soliciting Larry-related items to be placed on the shrine. Links to offsite content are good; or if you have small bits of content, such as quotes, you'd like to contribute, that's fine too. Please reply to this Quest with your humble offerings. Thank you! And may St. Larry bless your codings and your debuggings.

poll ideas quest 2024
Starts at: Jan 01, 2024 at 00:00
Ends at: Dec 31, 2024 at 23:59
Current Status: Active
2 replies by pollsters
    First, read How do I create a Poll?. Then suggest your poll here. Complete ideas are more likely to be used.

    Note that links may be used in choices but not in the title.

Monk Quips Quest
Starts at: May 01, 2023 at 08:00
Ends at: Apr 30, 2024 at 07:59
Current Status: Active
9 replies by erzuuli
    Esteemed Monk kcott has recently proposed an excellent idea.

    heretoforthwithstanding, we invite all monks to submit ideas for new monk quips!

    Your quip suggestion should include the following details:

    • Intended quip location: either XP Nodelet, Chatterbox, or Monkbar (that's the page header).
    • Text of quip.
    • Optional: background & foreground colours. If you include these, be sure they are nicely contrasting.

    .

Perl News
PDL 2.085_02 released
on Mar 25, 2024 at 16:58
0 replies by etj
    PDL 2.085_02 has just been released. Notable changes since 2.083:
    • Dataflow bugs have been fixed (GH#461)
    • Dimension-checking for inputs and outputs are now rigorous to stop accidentally writing to the same place several times (GH#445)
    • PDL::Graphics::PGPLOT has been moved into the PGPLOT CPAN distro and out of main-PDL
    • Speed improvements (GH#451)
    • A 20-year-old bug in rangeb has been fixed thanks to jo37

    Thank you to all those who reported bugs or unexpected behaviour, or ask why something or other isn't possible: you help make PDL better and better!

    The IRC channel (#pdl on irc.perl.org) is a great virtual place to come and ask questions, or just watch the GitHub messages flow by.

    Please give the new release a try and report problems.

Registration for The Perl and Raku Conference 2024 is open!
on Mar 16, 2024 at 00:59
0 replies by talexb

    The Perl and Raku Conference (formerly known as YAPC::NA) is going strong!

    This year, we are celebrating 25 years, our silver anniversary, in the Silver State, Nevada! The main conference will be in Las Vegas on June 25-27, but there will be hackathons and possibly classes on the day before and the day after the conference (June 24th and 28th), so please consider joining us for the whole week!

    The backbone of this conference has always been our tracks of "traditional" talks by community members and what we have come to call the "Hallway Track", the informal exchange of ideas and camaraderie that sparks new projects and fuels collaboration.

    This year, we are pleased also to host the presentation of Papers and Posters accepted by the Science Perl Journal!

    Go now to https://tprc.us/ to check out what is planned and to book a room (see link to Alexis Park Resort under "Location"). Rooms start at only $75 per night, so it’s worth booking early!

    The best way to register for the conference is here.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Supplications
Perl doesn't give error when module is not found
3 direct replies — Read more / Contribute
by Anonymous Monk
on Mar 26, 2024 at 06:36
    Very simply I don't have a 'use Data::Dumper' line in my script
    but when later on doing 'print Dump $myvar' I get no error!
    Also when doing 'print Dumperrrrrrrrrr $myvar' I get no error too!
    Why is that???????
boot_DynaLoader: what, where, how
2 direct replies — Read more / Contribute
by rodd
on Mar 23, 2024 at 09:26
    Respectable keepers of knowledge:

    I'm working on binding some JS and Perl code using Bun FFI (https://bun.sh/docs/api/ffi) and perlembed. Things work good, except for XS dynamic loading. Probably due to the way the Bun FFI links to the boot_DynaLoader in my libperl.so, and the general lack of tools and knowledge on my part to circumvent, emulate or recode some of those parts.

    So, my question: where or how in core is the libperl boot_DynaLoader C function defined? I just can't find it! I've been to the Perl core code and docs on XS, boot_DynaLoader and ExtUtils::Embed, but to my surprise I can't figure how it works or where its code resides in core (my core is 5.22.1).

    Any leads, links or pointers to help me acquire the knowledge of the inner workings of dynamic loading would be of great help.

    PD: I didn't want to bore you with my code, but here it is, for context:

    const xsInit = new JSCallback( (pTHX) => { Perl.Perl_newXS( perl, pstr('DynaLoader::boot_DynaLoader'), Perl.boot_DynaLoader.ptr, pstr(import.meta.file) ); }, { args: ['ptr'] } ); const rc = Perl.perl_parse(perl, xsInit.ptr, argc, argv, envp);

    The above does not dynamic loads XS modules as intended due to the way the FFI library exports symbols, which are meant primarily to be used within the JS realm, not to be sent back to libperl as a callback or (void *)() pointers. I've tried some other workarounds and practices, ie using my own compiled xs_init() function from C and FFI linking to that, but loading is still not working. I probably will be able to solve it at some point, but still, I'd like to understand the inner workings of the core in that regard. I got it working on darwin x86 by accident, but the same workaround fails in linux.

Holding site variables
7 direct replies — Read more / Contribute
by Bod
on Mar 21, 2024 at 06:39

    We operate a number of websites, all of which operate on the same server.

    Currently, I am the only developer. But that is likely to change over the next 18 months or so. I'm making some changes that present the opportunity to make some improvements to the internal design and security of the sites. I'm looking for some input on the "best" way to do this. Any input welcome but especially around global site variables.

    Currently we have this directory structure (plus a few others omitted for simplicity:

    site/prod/bin/ site/prod/lib/ site/prod/template/ site/prod/www/ site/test/bin/ site/test/lib/ site/test/template/ site/test/www/

    Every site has identical code in prod and test (except for during development of course) except for one file site/lib/vars.pm which declares the site variables needed for that site and environment. Things like the DB credentials, the DB instance to connect to, Stripe keys, API keys, etc.

    use strict; use warnings; our $env_db_user = 'dbusername'; our $env_db_pass = 'dbpassword'; our $env_paypal = 'PP username'; # etc, etc, etc
    There is no logic code in this module, it just defines variables with our. This module is used by a utility module that is used by every script on the website.

    When we bring another developer onboard, I want to split the site variables into two - those they have access to (test database schema name, text Stripe keys, etc) and those they don't (live Stripe keys, database credentials, etc). I could relocate this file to further up the directory structure where they don't have access, but I feel sure there is a better way to handle this as it must be a common problem in multi-developer environments.

    What I have works well and it not in need of imminent change. But I have opportunity to make it more robust as I am making other changes.

    What advise can you give on this matter kind and wise Monks?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-03-28 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found