submitted by /u/tarje [link] [comments] |
GitHub - catatsuy/purl: Streamlining Text Processing
Streamlining Text Processing. Contribute to catatsuy/purl development by creating an account on GitHub.GitHub
submitted by /u/joesuf4 [link] [comments] |
The Joy of DTrace
Apologies for the coughing, but this video is worth your time if you are a performance-tuning professional interested in what Dynamic Tracing toolchains (DTr...YouTube
Prior releases of the 6.x line relied on Lexical::Types, which was a major performance pessimisation over the 5.x releases.
6.0.4 relies on a simple source filter instead, which restores performance levels back to expected levels.
More benchmarks added to the test suite validate the dependency changes.
submitted by /u/joesuf4
[link] [comments]
submitted by /u/perlancar [link] [comments] |
List of new CPAN distributions – Mar 2024
dist author abstract date AI-Chat BOD Interact with AI Chat APIs 2024-03-02T22:12:10 AI-Image BOD Generate images using OpenAI's DALL-E 2024-03-06T23:01:10 Acme-CPANModules-LoadingModules PERL…perlancar's blog
HTTP/2 Dynamic Benchmarks (PHP vs. ModPerl2), 2024 edition.
I ram these about four years ago, and the time differentials were about the same then as now. Monolithic POSIX-threaded server architectures like mp2 + mpm_event will always dominate in low-latency/scalability HTTP/2 benchmarks because they leverage zero-copy in the runtime.
Anyways, sexy terminal graphs with smag to enjoy!
submitted by /u/joesuf4
[link] [comments]
Lessons learned: A) Performance freaks to stop using #rstat 's runif for random generation. The Hoshiro random number generator https://arxiv.org/abs/1805.01407 is 10x faster. Implementations in #perl 's #PDL, #rstats (dqrng) and #python #numpy are within 20% of each other B) But does it make a difference in applications? To get to the bottom of this, I coded a truncated random variate generator in #rstats and #perl using #pdl (as well as standard u/perl) using the #GSL packages https://metacpan.org/pod/PDL::GSL::CDF & https://metacpan.org/pod/Math::GSL for accessing the CDF & quantile functions. In this context, it's the calculation of the #CDF that is the computationally intensive part, not the drawing of the random number itself. C) I should probably blog about these experiments at some point. Note that #pdl (but not base #perl) are rather competitive choices for large array processing with numerical operations. I mostly stay away of #python , but would not surprise me that for compute intensive stuff (where the heavy duty work is done in C/C++), it does not matter (much) which high level language one uses to build data applications submitted by /u/ReplacementSlight413 |
mstdn.science
http://mstdn.science is a place for people our field (microbiology), scientists in general, and science enthusiasts to discuss research and topics surrounding our work.Mastodon hosted on mstdn.science
Programming Feed reshared this.
Hi, im working on this perl script wherein i should get all files with filename < 900000
Ex. sample_file_802856.txt sample_file_27364692.txt sample_file_385620.txt
the script should get:
sample_file_802856.txt sample_file_385620.txt
I already have the code but it’s failing on this part coz im having a hard time getting the regex for < 900000 😆
submitted by /u/advinculareily
[link] [comments]
Hi,
I am moving to RedHat 9 from RedHat 7. I am running Apache with mod_perl.
I have installed the mod_perl package on the RedHat 9 box. I am getting this error on bit of code that I wrote:
Can't locate XSLoader.pm: /usr/local/lib64/perl5/5.32/XSLoader.pm: Permission denied at /usr/lib64/perl5/vendor_perl/Apache2/XSLoader.pm line 22.\nBEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/Apache2/XSLoader.pm line 22.\nCompilation failed in require at /usr/lib64/perl5/vendor_perl/Apache2/Access.pm line 24.\nBEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/Apache2/Access.pm line 24.
When I do a search for XSLoader.pm, I find:
/usr/lib64/perl5/vendor_perl/APR/XSLoader.pm /usr/lib64/perl5/vendor_perl/Apache2/XSLoader.pm /usr/share/perl5/XSLoader.pm
I am guessing I have some path issue. Any ideas what I may need to do?
thank you
submitted by /u/OrganicStructure1739
[link] [comments]
Or some other OO module? Or did they cook their own spice that includes Moose and custom approaches?
submitted by /u/ReplacementSlight413
[link] [comments]
I work in infosec, specifically in penetration testing. I learned Perl to some extent years ago when Metasploit was still written in Perl (They switched to Ruby). It seems these days that most people in my industry like Python, and some of the most important modules we use in my field are in Python. Does Perl offer any modules as comprehensive as Impacket for hacking protocols such as SMB, WMI, Kerberos, etc?
submitted by /u/aecyberpro
[link] [comments]
I think we need to create the next generation of Perl devs, because one day we’ll all be dead. What will Perl become if we don’t train as many people as we can?
submitted by /u/karjala
[link] [comments]
[link] [comments]
Collecting talks - Perl Hacks
I gave my first public talk sometime between the 22nd and 24th September 2000. It was at the first YAPC::Europe which was held in London between those dates. I can't be any more precise because the schedule is no longer online and memory fades.Dave Cross (Perl Hacks)
submitted by /u/nmariusp [link] [comments] |
Perl programming using KDE's Kate editor in Linux tutorial - March 2024 - f5c89eca
How to configure Kate for the programming language Perl 5. I install Kate and the CPAN Perl module Perl::LanguageServer from https://github.com/richterger/Pe...YouTube
A new release of PDL is out! It's been about a year since I last posted on here about a PDL release (last was PDL 2.083).
A selection of changes since PDL 2.083:
- Diab Jerius reported that a previous change to
[xyz]vals
to return at least a double had a regression for code that requests an explicit type smaller than that. Fixed in 2.085.
Diab Jerius also reported several other edge cases: 1, 2, 3 including a fix forvsearch
.Also, Diab Jerius modularised the primitive ops tests which allows for faster parallel testing.
- Harald Jörg reported that large arrays would cause
PDL::FFT
to crash. Fixed by switching from the stack VLAs to heap allocation. Fixed in 2.085.
While it is recommended to usePDL::FFTW3
instead,PDL::FFT
is bundled withPDL
for the cases wherePDL::FFTW3
can not be easily installed. - Bas Couwenberg reported and fixed a previously deprecated API in HDF4 which has now been removed and replaced. Fixed in 2.085.
As part of the Debian release process, Bas Couwenberg reported a failure on i386. Fixed in 2.087. - Shawn Laffan provided an improvement to
PDL::GIS::Proj
so that it would load correctly on Windows viaAlien::proj
. - Po-Chuan Hsieh provided a build fix for FreeBSD on
amd64
. I also happened to talk to James E Keenan around the same time about PDL builds on FreeBSD so this was followed up by adding CI testing for FreeBSD. Fixed in 2.085. - Ryan Egesdahl provided a fix for macOS Ventura which changed the location of GLUT headers. Fixed in 2.085.
- Eli Schwartz reported an upstream Gentoo bug when building with LTO that uncovered 64-bit issues in Minuit and Slatec Fortran code. Fixed in 2.086.
@vadim-160102
reported several issues with stringification: 1, 2; one of which uncovered a bug in conversion of ulonglong to Perl scalar.- Karl Glazebrook,
@vadim-160102
, and users from PerlMonks provided valuable reports in tracking down issues with dataflow https://github.com/PDLPorters/pdl/issues/461. Fix available in 2.086. - Jörg Sommrey contributed improved typemap handling which allows for using the typemap definitions that are available in Perl's default typemap. Available in 2.086.
- Ed has added many improvements to the PP code generator and internal API as well as several new functions. Please see the Changes file for details!
Of note are several speed improvements that are inspired by Eric Wheeler's note about the speed ofsequence()
.
A full list of closed issues and PRs is here. Thanks to all the contributors!
There are also some things to report from the wider World of PDL:
- Jörg Sommrey has released a PDL interface to GLPK (GNU Linear Programming Kit) for mathematical optimization: https://metacpan.org/pod/PDL::Opt::GLPK.
- The
PGPLOT
distribution now incorporatesPDL::Graphics::PGPLOT
module that was in thePDL
distribution. The dependencies remain the same. PDL::Graphics::Simple
had some small updates to the drivers. This is preparation for splitting the backend engines to their respective backend distributions (not yet released) and defining an API version that the engines conform to.
submitted by /u/zmughal
[link] [comments]
SF feature request #82 - Alternate type behaviour for xvals, yvals, zvals · Issue #330 · PDLPorters/pdl
https://sourceforge.net/p/pdl/feature-requests/82/ @zmughal writes: I noticed the caveat for xvals, yvals, and zvals regarding the type: CAVEAT: If you use the single argument piddle form (top row ...GitHub
[link] [comments]
(cdxc) 7 great CPAN modules released last week
Updates for great CPAN modules released last week. A module is considered great if its favorites count is greater or equal than 12. CPA...niceperl.blogspot.com
Greetings monks, question about reorganizing a Perl module, and if the following is a good approach:
The module is 7300 lines in one file and has 106 subs. I'll call it Cat.pm, its mostly called as an object like Cat->new(); but could be called like Cat->black() or Cat::Black::meow
To simplify maintaining this file I am thinking I can make a new sub directory in the same folder as the file call it Cat/ and move the 105 of the 106 subs to about 12 or 15 new .pm's in the new folder.
I plan later to rewrite one or more of those as XS modules. Cat/Tabby_XS.pm etc.
Then in Cat.pm I would just have use Cat::Black; use Cat::White; use Cat:;tabby; ...etc in Cat.pm
The only sub I'd keep in Cat.pm is sub new which looks like this:
sub new { #Object Interface #http://www.perl.com/pub/1999/09/refererents.html my $type = shift; my $self = {}; $self->{dbh} = shift; bless $self, $type; $self; }
I have a book on cleaning up old perl code but it is now a very old book LOL, will moving the subroutines to new files break old code that depends on Cat.pm? TIA
submitted by /u/bug_splat
[link] [comments]
submitted by /u/davorg [link] [comments] |
Amazon Links and Buttons - Perl Hacks
I’ve spent more than a reasonable amount of time thinking about Amazon links over the last three or four years. It started with the Perl School web site.Dave Cross (Perl Hacks)
This isn't directly perl-related, but it's a good reminder that as the bus-factor of our projects dwindle down to 0, the danger of a dependency attack goes up.
The story is still unfolding, and I've just been reading it from the HN post
In this case, it appears that the maintainer of xz-utils, who has been maintaining it since 2009 and mentioned online that they don't really have the capacity for it anymore finally had a motivated helper show up to assist with the work 2.5 years ago. That motivated helper now appears to either be a long-con state actor, or a compromised account.
liblzma is used by libsystemd. Redhat and Debian patch ssh to use libsystemd. The startup code of libxz detects when it is loaded into sshd during initialization and replaces a core auth function of sshd with its own copy. The malicious code comes from compressed compiled code within one of the libxz unit test files that gets sneakily injected into the build during the ./configure script. The person who discovered it only found it due to valgrind errors and a slower startup time for ssh, which are mistakes a more sophisticated attacker might not have made.
Oh, and of course the question on everyone's mind, you're probably not affected yet because the latest liblzma is only used in pre-release distros right now. But check if you have xz 5.6 or later. However, the author has been contributing to xz for 2.5 years so who knows if this is the first attack or not...
submitted by /u/nrdvana
[link] [comments]
Hi all,
I have most difficulties to make my LWP::UserAgent to use TLS 1.2/1.3
I tried :
my $ua = new LWP::UserAgent( 'ssl_opts' => { SSL_version => 'TLSv12:!SSLv2:!SSLv3:!TLSv1:!TLSv11', } );
but no success .....
also tried :
$ENV{https_version}=3;
perl v5.32 is not that old, I am very surprised I can't establish connecting to TLS 1.2/1.3 server
Is it a known problem with openSSL version used to compile v5.32 ? if so, can I upgrade the SSL libs only ? or is there an option to pass on to force TLS 1.2/1.3 ?
Windows 10 - strawberry v5.32.1 MSWin32-x64-multi-thread
Thank you very much !
submitted by /u/lowpowerdesign
[link] [comments]
I have a bunch of YAML config files (using YAML::XS) which are multidimensional, and the values can be HASH, ARRAY, or SCALAR. Right now, I have a kind of a template YAML that defines the layout that someone can use as a reference to write a config file. The keys and layout are the same, except instead of having values it has two keys: 1) required (boolean) and 2) type (ARRAY, HASH, STR, etc). What I would like is for a sub to just verify the tree and spit out an error on which key is the problem, but I'm getting kind of lost on trying to loop both trees together.
Here is a small example from a part of a YAML config.
split: level: 3 filter: directories: delete: - \/main.assets$ keep: - S2589004224001688 files: keep: - issue.xml - main.xml - main.pdf
And here is a small example from the YAML config template that someone uses as a reference.
split: required: True type: HASH group: required: False type: HASH by: required: True type: STR count: required: True type: STR level: required: True type: INT filter: required: False type: HASH directories: required: False type: HASH delete: required: False type: ARRAY keep: required: False type: ARRAY files: required: False type: HASH delete: required: False type: ARRAY keep: required: False type: ARRAY
submitted by /u/sirhalos
[link] [comments]
Some fun with chatgpt (note that you can get the same information with a rudimentary search across various research databases followed by statistical analysis of the tags)
When reading the chat bot response note that
legacy systems include many/most of the research tools in many fields many of the legacy systems are heavily dependent on bash for gluing their individual components many of these legacy systems include a noninsignificant amount for web programming Python / R etc just glue over code written in C and Fortran, ie they just provide an API
Prompt: can you suggest a few application areas for perl as glue in scientific component based software engineering?
Perl can be effectively used as "glue" in scientific component-based software engineering due to its strong text manipulation capabilities, mature ecosystem, and ability to interface with various systems and languages. Here are a few application areas where Perl can excel as a glue language:
1. Bioinformatics Pipelines
Perl has been traditionally strong in bioinformatics, where it is used to connect different software components for tasks like DNA sequence analysis, protein structure prediction, and genetic data processing. It can orchestrate workflows that involve calling various tools, parsing their output, and preparing it for the next step in the analysis pipeline.
2. Data Transformation and Integration
In scientific computing, there is often a need to transform data between different formats or integrate data from various sources. Perl can serve as a glue language to script these transformations and integrations, handling formats like CSV, JSON, XML, and proprietary binary formats commonly used in scientific instruments.
3. System Administration for Research Computing
Perl can automate and manage tasks in research computing environments, such as scheduling jobs on a compute cluster, monitoring resource usage, and managing file systems. It can glue together various system components, ensuring they work seamlessly to support scientific computation.
4. Legacy Scientific Software Integration
Many scientific research fields have legacy software components written in Perl or that provide Perl interfaces. Perl can be used to integrate these components with newer systems, preserving the value of previous investments in software development.
5. Automated Reporting and Visualization
Perl can be used to generate automated reports and visualizations from scientific data. By gluing together data extraction, analysis, and reporting tools, Perl scripts can produce regular, up-to-date reports or visualizations of ongoing scientific research or experiments.
Limitations to Consider
While Perl is useful in these areas, it's essential to consider its limitations. The ecosystem around Perl, particularly in scientific computing, may not be as vibrant as it once was, with many new developments occurring in other languages like Python. Therefore, while Perl remains a powerful tool for certain tasks, its role in new scientific software projects might be more limited compared to its peak usage times.
In conclusion, Perl's role as glue in scientific component-based software engineering is well established, particularly in areas where text processing and legacy system integration are paramount. However, the choice to use Perl should be balanced with considerations about the current and future needs of the project, as well as the availability of skills and community support.
submitted by /u/ReplacementSlight413
[link] [comments]
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!
Registration is open, so your ticket can now be purchased.
Talk submissions are still open, and we are seeking proposals on a wide variety of subjects. This includes language features, personal projects, applications like Koha, and anything that may be of general interest to Perl and Raku programmers. (We had juggling and origami in the past. Fun!)
- Talks can be 20 minutes or 50 minutes. Please submit through PaperCall.
- Papers and Posters follow the guidelines of the Science Perl Journal. Links to both are also on https://tprc.us.
Speakers who are approved for a talk, paper, or poster will receive a free ticket to the event. The submission deadline is April 5th at 8pm EST, so please send us your submissions soon!
We are planning some special activities during the conference to celebrate our rich 25-year history.
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 at https://tprc2024.sched.com/tickets
Thanks, TPRC Admins
submitted by /u/nahthanxx
[link] [comments]
The Perl and Raku Conference 2024 in Las Vegas Schedule
Check out the schedule for The Perl and Raku Conference 2024 in Las Vegastprc2024.sched.com
Does anybody know what happened with the package Catalyst::Plugin::FormValidator, why it was removed from cpan?
submitted by /u/ruzhnikov
[link] [comments]
Strawberry Perl is distributed with its own winlibs distribution. E.g., if the perl distribution is placed in c:/strawberry, the winlibs distribution is placed in c:/strawberry/c. May I replace this winlibs distribution with a different, newer winlibs distribution placed in c:/winlibs (for example)? Of course this will come with a path update.
submitted by /u/Sharp_Artichoke_8237
[link] [comments]
[link] [comments]
(cdlxxxviii) 12 great CPAN modules released last week
Updates for great CPAN modules released last week. A module is considered great if its favorites count is greater or equal than 12. App...niceperl.blogspot.com
Perl official company author's are being manipulated
https://www.youtube.com/watch?v=ZDk8y83lyAc
Perl official company author's are being manipulated
submitted by /u/todo_bem
[link] [comments]
This is the explanation of what happened to Perl Author : INGENICO
https://www.youtube.com/watch?v=Qw-gBQHa3RY&list=LL&index=1
submitted by /u/todo_bem
[link] [comments]
The Official Perl programming language authors upload server and Perl Archive Network got hacked
The official Perl programming language authors upload server and and Perl Archive Network (cpan.org) got skipped by cranky stalker and here is a journey insi...YouTube
I've finally had some more time to do some real work related to perl.social again, and there was a recent question from someone again about me actually adopting a proper ToS/CoC there.
I'm not a lawyer so I've decided as a starting point that looking at similar communities out there and so I've grabbed the Mastodon CoC to start the discussion. I do not want to wholesale put anything into place without input from the community, so I'm going to start a discussion here and on perl.social (I'll edit a link to the post once I make it).
COC/TOS
Borrowing many things from the Mastodon CoC as a astarting point (https://github.com/mastodon/mastodon/blob/main/CODE_OF_CONDUCT.md).
I am removing a few things from it, not because I don't think they're good ideas or anything but also because I want to limit the scope of the initial discussion and the amount of work for myself as I'm still currently the only moderator but once the community there gets larger or it changes that I'm not the only one maintaining things, we will hold another discussion about everything.
I've changed a few things also, specifically to add stronger language that any moderators MUST document why an action was taken. This doesn't necessarily mean that I believe that those reasons must be immediately given to an affected user, but that they must be available when requested. Specifically I'm thinking of not informing in the context of bots, spam, illegal or otherwise legally actionable content (i.e. something that's going to get me a subpeona or court case).
Other proposed ideas: 1) Some kind of regular discussion, maybe annually? on ToS/CoC type things 1a) The idea being that we require a regular discussion of anything that's happened over the last time period to avoid it being possible for something happening being "swept under the rug" or "falling through the cracks" because it didn't get the proper time given to it previously. How this should be done I have no good recommendations for, likely creating a group on perl.social to host the conversation each time? 2) ?
Contributor Covenant Code of Conduct
Our Pledge
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
Privacy
I reserve the right to collect email or other identifiable contact information, and it will never be shared to an outside party without consent except in the case of it being required by some legal process. If at any time perl.social becomes a larger organization and there is a desire to change this, I will require the removal of all such information until explicit consent is given again with such a new policy. I don't know if there's a way I can make this legally enforcable but I see it as something I do not own and therefore cannot ethically give it to another party in that kind of scenario.
Both perl.social and I are located in the USA, and therefore I believe are not directly subject to the GDPR, but as there are similar laws in other jurisdictions even within the USA, and I basically agree with the ideas involved, I will do whatever is reasonable feasible to follow them.
Our Standards
Examples of behavior that contributes to a positive environment for our community include:
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community
Examples of unacceptable behavior include:
- The use of public and/or unwanted sexualized language or imagery, and sexual attention or advances of any kind. Consenting adults in private should be acceptable.
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and MUST communicate reasons for moderation decisions.
Scope
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [hello@joinmastodon.org](mailto:hello@joinmastodon.org). All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
1. Correction
Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
2. Warning
Community Impact: A violation through a single incident or series of actions.
Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
3. Temporary Ban
Community Impact: A serious violation of community standards, including sustained inappropriate behavior.
Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
4. Permanent Ban
Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
Consequence: A permanent ban from any sort of public interaction within the community.
Attribution
This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
And from the Mastodon code of conduct available at https://github.com/mastodon/mastodon/blob/main/CODE_OF_CONDUCT.md
Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.
For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
submitted by /u/simcop2387
[link] [comments]
GitHub - mozilla/inclusion: Our repository for Diversity, Equity and Inclusion work at Mozilla
Our repository for Diversity, Equity and Inclusion work at Mozilla - mozilla/inclusionGitHub
submitted by /u/oalders [link] [comments] |
Hotel hotspot hijinks
Ever been staying at a hotel and gotten annoyed that you always have to open a browser to log in for wireless access? Yup, me too.Paul Cochrane (P.T.C.)
Problem- I have an apache application in which I am using mod_perl module. I want to log few things in a request lifecycle. I am able to do it across multiple files by calling get_logger("nameOfLogger"); and log to the hash that I am maintaining in my appender. But strangely there is one file in which when I call get_logger("nameOfLogger"); it no more has context of previous logs that I have captured before it in other files. What could be the possible cause. does this file needs to be in startup.pl ?
I would really appreciate the help and suggestions since I am stuck on this issue since a day
submitted by /u/FiredNeuron97
[link] [comments]
https://metacpan.org/recent is showing a reupload of perl-5.38.2 by user INGENICO.
submitted by /u/briang_
[link] [comments]
Hey all!
As a recent graduate seeking a junior developer position, I received an invitation for a job interview which included a Perl coding exercise. How can i make my code better? Additionally, are there recommended best practices for documenting my progress on this exercise? I never programmed in perl, so bare with me. Thanks a lot!!
here's the task:
- read the data from a .csv file
- store data in one hash
- outputs the data as HTML, sorted by company and within the company by name
here is my code:
#!/usr/bin/perl use strict; use warnings; use Text::CSV; my $csv_file = 'Bewerbungstest.csv'; open(my $fh, '<', $csv_file) or die "Could not open file '$csv_file' $!"; my $csv = Text::CSV->new({ binary => 1 }) or die "Cannot use CSV: ".Text::CSV->error_diag(); $csv->header($fh); # Hash Wert my %data_hash; while (my $row = $csv->getline($fh)) { my $pid = $row->[0]; # PID as key my $company = $row->[1]; # Company name as key my $last_name = $row->[2]; # Employee last name my $first_name = $row->[3]; # Employee first name push @{$data_hash{$company}}, [$pid, $last_name, $first_name]; } close($fh); # Sort the company names alphabetically foreach my $company (sort keys %data_hash) { @{$data_hash{$company}} = sort {$a->[1] cmp $b->[1]} @{$data_hash{$company}}; } # HTML Output open(HTML, '>', 'output.html') or die "Could not open file: $!"; print HTML "<html>\n"; print HTML "<head>\n"; print HTML "<title>Employee List</title>\n"; print HTML "</head>\n"; print HTML "<body>\n"; print HTML "<h1>User Liste</h1>\n"; print HTML "<table border='1'>\n"; print HTML "<tr><th>PID</th><th>Company</th><th>Last Name</th><th>First Name</th>\n"; foreach my $company (sort keys %data_hash) { foreach my $entry (@{$data_hash{$company}}) { my ($pid, $last_name, $first_name,) = @$entry; print HTML "<tr>\n"; print HTML "<td>$pid</td>\n"; print HTML "<td>$company</td>\n"; print HTML "<td>$last_name</td>\n"; print HTML "<td>$first_name</td>\n"; print HTML "</tr>\n"; } } print HTML "</table>\n"; print HTML "</body>\n"; print HTML "</html>\n"; close(HTML); print "HTML file erfolgreich generiert\n";
submitted by /u/stayin_alive23
[link] [comments]
I have inherited some perl scripts that I've generally been able to edit well enough with my knowledge from other languages, but I need to make a change that has me stumped.
The user wants the output that happens from this loop to be reversed.
for ($nn=0;$nn<=$range_max;$nn++) { my $range=sprintf("%02d",$nn); $sum_of_A += $A_EACH_RANGE{"$range"}; $sum_of_B += $B_EACH_RANGE{"$range"}; printf("\"\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\"\n", $scale[$nn], commify($A_EACH_RANGE{"$range"}), commify($B_EACH_RANGE{"$range"}), commify($sum_of_A), commify($sum_of_B)); }
So I figured all I had to do was start the for loop at the end like this:
for ($nn=$range_max;$nn>=0;$nn--) {
Then I realized there's some cumulative math going on in the loop, which means the sum of everything needs to be at the top now instead of the bottom.
Now I'm stuck, I've made a few attempts like pushing it into an array so I could have the option to output in forward or reverse, but all my attempts just hang with no warnings or errors.
I figure there's a more elegant solution but my Google-fu hasn't helped.
submitted by /u/wirikidor
[link] [comments]
Randal Schwartz is guest on Flosss Weekly 765, mostly for Dart, but he also talks quite a bit about Perl.
One of the interesting management of Dart is that they have people assigned to work shifts to triage and respond to issues so that requestors can get immediate feedback that at least someone saw their issue. I'll let him tell the rest of the story, but it's a good one.
submitted by /u/briandfoy
[link] [comments]
FLOSS Weekly Episode 765: That Ship Sailed… And Sank
This week Jonathan Bennett and Aaron Newcomb talk with Randal Schwartz, the longest running host of FLOSS Weekly, Perl’s biggest cheerleader, and now Dart and Flutter expert. What’s new…Hackaday
Hi,
I am using Template::Mustache in a prooted Debian in termux on Android.
It works fine, however it produces this annoying warning:
"Flock not available: 'Function not implemented': continuing in unsafe mode".
As far as I can see it ultimately comes from Path::Tiny when slurping a file.
I have tried to get rid of it with "no warnings" but that did not do the trick.
So how can I suppress this warning?
submitted by /u/ghiste
[link] [comments]
[link] [comments]
(cdlxxxvii) 12 great CPAN modules released last week
Updates for great CPAN modules released last week. A module is considered great if its favorites count is greater or equal than 12. App...niceperl.blogspot.com
[link] [comments]
Hackathon Perl / Open Food Facts in Paris
2024-03-23T09:00:00Z (UTC)→2024-03-24T17:00:00Z (UTC) Open Food Facts, 3 avenue victoria, 79004 Paris English below French En association avec les mongueurs, nous proposons d’organiser un Hackathon (marathon de programmation) autour de l’utilisat…Open Food Facts Forum
Hello everyone, I'm new to Perl and I'm currently writing a script to handle a repeated call of a sequence of commands (currently using the ` operator to evaluate them) to generate a dataset. As the generation takes a lot of time, i would like to find a way to do a clean interrupt in the middle in case I need to shutdown, so I set up a sigint handler to exit the loop. However, the Sigint also interrupts the command and I would like to avoid that. Since I don't really have control over the command's code, is there a way to block the sigint from Perl to prevent it from reaching the evaluating command?
submitted by /u/P1G4ME
[link] [comments]
So, I was imagining some sort of debug thingy, where one would insert debug commands into code, like with two ##es like critic or even straight Perl as with Data::Printer. But these wouldn't render on stderr but to another output. A tmux layout on another shell would then listen to these output and display whatever comes from the executing code. Like some kind of display socket.
It would render in a log like way, but also tui like, say htop, kind. How, in gross terms, and with which libs, could this be done?
submitted by /u/fellowsnaketeaser
[link] [comments]
submitted by /u/davorg [link] [comments] |
Pointless personal side projects - Perl Hacks
I can’t be the only programmer who does this. You’re looking for an online service to fill some need in your life. You look at three or four competing products and they all get close but none of them do everything you want.Dave Cross (Perl Hacks)