Build hash based classes.
Changes for 0.012 - 2024-03-21T13:55:43-07:00
- Do not taint $@, $!, $? or $^E when checking for Class::XSAccessor.
- Ignore __DIE__ handlers when checking for Class::XSAccessor.
Check at build/release time if modules are out of date
Changes for 0.060 - 2024-03-21T17:39:03Z
- fix experimental warnings on earlier perls
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.)
Plack search application.
Changes for 0.04 - 2024-03-21T14:13:15+01:00
- Add missing 'image_height' parameter description in doc.
- Add 'image_radius' parameter.
- Add 'name' attribute to search field.
Implementation of various techniques used in data compression.
Changes for 0.02 - 2024-03-21
- ADDITIONS
- CHANGES
Use Data::Dump::IfSmall format refs
Changes for 0.001 - 2024-02-16
- First release.
Provides United States of America holidays
Changes for 0.0200 - 2024-03-19T15:51:00Z
- Fix docs.
Curaçao's official holidays
Changes for 0.003 - 2024-03-19T21:03:44Z
- Another POD fix
access GCC compiler builtin functions via XS
Changes for 0.02 - 2024-03-19
- Added a few more builtins. Fixed pod.
https://metacpan.org/recent is showing a reupload of perl-5.38.2 by user INGENICO.
submitted by /u/briang_
[link] [comments]
access GCC compiler builtin functions via XS
Changes for 0.01
- First version, released on an unsuspecting world.
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]
Data objects for login.
Changes for 0.02 - 2024-03-19T14:01:19+01:00
- Regen example file.
- Rewrite to new Data::HashType@0.04 with added 'valid_from' parameter.
Random hash type objects.
Changes for 0.03 - 2024-03-19T13:59:34+01:00
- Add support for Data::HashType@0.04.
find, build and install the bowtie2 tools
Changes for 0.01 - 2024-03-19T05:13:18-06:00
Data objects for hash type.
Changes for 0.04 - 2024-03-19T13:12:38+01:00
- API CHANGE: Add 'valid_from' and 'valid_to' parameters. 'active' parameter will be removed in future. And 'valid_from' will be required in future.
- Add DESCRIPTION section to doc.
An open source web-based network management tool.
Changes for 2.074000 - 2024-03-19
- NEW FEATURES
- BUG FIXES
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)
[link] [comments]
(cdlxxxvi) 15 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. CGI...niceperl.blogspot.com
sealed.pm implements dougm’s original patch to compile method lookups for typed lexicals:
https://www.perl.com/pub/2000/06/dougpatch.html/
v5.1.5 on CPAN resolves longstanding reentrancy issues.
Internally sealed always relied on an undocumented method in B::Generate to construct the replacement B::PADOP opcode, but internally it’s invoking newPADOP, which leaves the associated padname unaddressed.
This causes segfaults in Perl_pad_push reliably, when it indexes that padname element.
In v5.1.5, the padname gets created by an XS subroutine, which does the needful.
submitted by /u/joesuf4
[link] [comments]
Notes on Doug's Method Lookup Patch
Since 1997 Perl.com has published articles about the Perl programming language, its culture and community.Perl.com
Is there a module that can facilitate writing something similar to DBI, where one uses a common API for many different tools, swapping one for another but keeping the rest of of the program intact ? The non OO way is that of a dispatch table, but I want to elevate my OO a bit, and allow registration of components without touching the main application.
submitted by /u/ReplacementSlight413
[link] [comments]
[link] [comments]
(cdlxxxv) 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. CGI...niceperl.blogspot.com
submitted by /u/ThranPoster [link] [comments] |
Thranpages :: devlog :: Rescamming: The story of haha.pl
A naughty script delivers payback to some Facebook scammers. A story featuring Perl, great justice and many copypastas.Thranpages
Reading sequences from fasta foramt alignment by Bio::Perl
Perl Weekly Challenge 258: Count Even Digits Numbers