Skip to main content




Random hash type objects.

Changes for 0.05 - 2024-03-22T19:10:24+01:00

  • Parameter 'num_generated' rewrite to use check_required().
  • Update to Data::HashType@0.05 without 'active' parameter.






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.


Hotel hotspot hijinks submitted by /u/oalders
[link] [comments]


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


ANSI sequence aware column command

Changes for 1.4101 - 2024-03-21T07:50:10Z

  • make man page accurate


data pack for Business::ISBN

Changes for 20240321.001 - 2024-03-21T07:16:25Z

  • Data update for 2024-03-21



Merges two users into the same effective user

Changes for 1.09 - 2024-03-20

  • Do not try to load user from an empty email address
  • Fix uninitialized warnings cased by undefined FIELD
  • Only limit roles by id for valid users


IRS Form 1040 worksheets calculations

Changes for 0.05 - 2024-02-23T09:49:50Z

  • In 0.04, pp_ssbw() wasn't doing any pretty-printing. Corrected.
  • Like preceding versions, this version will probably not make it to CPAN, so I'm tagging it and pushing to GH


high-performance, selector-based, content-aware HTML template engine

Changes for 0.0901 - 2024-03-20

  • fix a few typos in the documentation
  • no functional changes




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]






access GCC compiler builtin functions via XS

Changes for 0.03 - 2024-03-20

  • Added more builtins. Added one test file for each builtin function supported. Created benchmarks comparing clz() XS vs PP. Enhanced documentation.


SPVM Language

Changes for 0.989089 - 2023-03-19

  • Incompatible Changes
  • Internal Changes



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.



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]




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]



submitted by /u/niceperl
[link] [comments]


submitted by /u/oalders
[link] [comments]



Hi all.

I'm currently working as a PHP Developer, and I want to learn something new, because I've been developing in PHP for 7 years.

My current tech leader is a super senior developer with around 25 years of experience developing software, and he said his main programming language is Perl, and he worked with it so many years and so many projects, also he said he could teach me Perl in an advanced way if I wanted to.

So i have this opportunity to learn Perl from a professional with a lot of experience.

The only thing stops me, is that I know that Perl jobs are not that common, at least not as PHP jobs.

But something that motivates me is learning a new technology and apply it.

I know there are a lot of JS and Python jobs, but I don't really like those languages, I would prefer Java or C#.

This is my situation, should I invest this time into learning Perl if I want to expand my market opportunities?

Greetings!

submitted by /u/oscar_96vasa
[link] [comments]



List of new CPAN distributions – Feb 2024 submitted by /u/perlancar
[link] [comments]



Hi,

Can anyone help explain to me why this is failing? I am trying to install Env::C and it seems to me that it is failing because of a leak test. Am I reading that right?

[root@a34 ~]# cat /root/.cpanm/work/1708960597.71560/build.log cpanm (App::cpanminus) 1.7047 on perl 5.026003 built for x86_64-linux-thread-multi Work directory is /root/.cpanm/work/1708960597.71560 You have make /usr/bin/make You have LWP 6.34 You have /usr/bin/tar: tar (GNU tar) 1.30 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. You have /usr/bin/unzip Searching Env::C () on cpanmetadb ... --> Working on Env::C Fetching http://www.cpan.org/authors/id/M/MS/MSCHOUT/Env-C-0.15.tar.gz -> OK Unpacking Env-C-0.15.tar.gz Entering Env-C-0.15 Checking configure dependencies from META.json Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.34) Configuring Env-C-0.15 Running Makefile.PL Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Env::C Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have warnings 0 ... Yes (1.37) Checking if you have DynaLoader 0 ... Yes (1.42) Checking if you have strict 0 ... Yes (1.11) Checking if you have Test::More 0.88 ... Yes (1.302135) Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34) Building and testing Env-C-0.15 cp lib/Env/C.pm blib/lib/Env/C.pm Running Mkbootstrap for C () chmod 644 "C.bs" "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- C.bs blib/arch/auto/Env/C/C.bs 644 "/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap '/usr/share/perl5/ExtUtils/typemap' C.xs > C.xsc Please specify prototyping behavior for C.xs (see perlxs manual) mv C.xsc C.c gcc -c -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -DVERSION=\"0.15\" -DXS_VERSION=\"0.15\" -fPIC "-I/usr/lib64/perl5/CORE" C.c rm -f blib/arch/auto/Env/C/C.so gcc -lpthread -shared -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -fstack-protector-strong C.o -o blib/arch/auto/Env/C/C.so \ -lperl \ chmod 755 blib/arch/auto/Env/C/C.so Manifying 1 pod document "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- C.bs blib/arch/auto/Env/C/C.bs 644 PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/author-pod-coverage.t .. skipped: these tests are for testing by the author t/author-pod-syntax.t .... skipped: these tests are for testing by the author t/author-signature.t ..... skipped: these tests are for testing by the author # Failed test 'setenv does not leak' # at t/leak.t line 31. # got: 63416 # expected: 63418 # Looks like you failed 1 test of 1. t/leak.t ................. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests t/smoke-multi.t .......... ok t/smoke.t ................ ok Test Summary Report ------------------- t/leak.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=6, Tests=14, 0 wallclock secs ( 0.01 usr 0.01 sys + 0.30 cusr 0.01 csys = 0.33 CPU) Result: FAIL Failed 1/6 test programs. 1/14 subtests failed. make: *** [Makefile:1033: test_dynamic] Error 255 -> FAIL Installing Env::C failed. See /root/.cpanm/work/1708960597.71560/build.log for details. Retry with --force to force install it. [root@a34 ~]# 

submitted by /u/dovi5988
[link] [comments]



Webservice to connect to Onfido API

Changes for 0.006 - 2023-07-02T15:36:03+00:00

  • Add hook



Open a file for shared reading and/or writing

Changes for 4.05 - 2023-07-02

  • Fix tests with perl-5.38.0.


Fast, safe DBI connection and transaction management

Changes for 0.59

  • Fix for Windows t/load.t failures