Skip to main content



My environment is perl/5.18.2 on CentOs 7

I'm trying to use a SWIG generated module in perl, which has a c plus plus backend. The backend.cpp sets an environment variable, $MY_ENV_VAR =1

But when I try to access this in perl, using $ENV{MY_ENV_VAR} this is undef.

However doing something like print echo $MY_ENV_VAR works

So the variable is set in the process, but it's not reflected automatically since nothing updates the $ENV data structure.

I'm assuming it may work using some getEnv like mechanism, but is there a way to reset/ refresh the $ENV that it rebuilds itself from the current environment?

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



By default cpanm drops Perl modules into ~/perl5. How do I tell cpanm to use a different location, such as ~/.local/share/perl5 instead?

submitted by /u/s-ro_mojosa
[link] [comments]



Fast Perl SSG: now with automatic Language Translation via OCI and translate.pl. Check it out at

https://github.com/SunStarSys/orion

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



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


Im working on a script to test using a jump server to reach remote devices.

I'm able to connect to the jump server using Net::SSH::Expect, however, I'm not sure how to then ssh to a remote device (network element).

Is there a way to create that ssh to the remote device inside the jump server's connection?

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



First things first, I am a data engineer but have little experience in Perl. I've been able to make some easy updates to scripts in the past but this one is a bit tougher.

I have been asked to update a Perl cgi web app that someone wrote ages ago that is used to view and manipulate text files. Currently it is hosted on server (X) and manipulates the files on that same server. However, we have to have backups/mirrors of the data on a dev server and another prod sever (Y). I.e., if I push the button to move the file to a different folder, it should do that on all three servers instead of just X. I added code to do this, referencing the additional servers with their UNC names, but I just get an error "No such file or directory" (which is not true). Googling has suggested that there may be an issue with permissions, but I can bring up the Y and DEV servers from a windows file explorer using the same path so I don't think that is necessarily the issue.

Example: Here we are trying to copy the file with a letter appended a given number of times. It works fine on the X server, its when trying to make it also work on the Y and DEV servers I get an error.

our $DIR_X = "\\\\serverX\\folder\\subfolder" ; our $DIR_Y = "\\\\serverY\\folder\\subfolder"; our $DIR_DEV = "\\\\serverDEV\\folder\\subfolder"; . . . }elsif ($query->param('action') eq 'split' && $query->param('fileNum') ne "") { my $fileNum $query->param('fileNum'); my $fileX=$DIR_X . "\\" . $fileNum . ".txt"; my $fileY $DIR_Y . "\\" . $fileNum . ".txt"; my $fileDEV = $DIR_DEV . "\\" . $fileNum . ".txt"; my $splitNbr = $query->param('splitNbr'); my @letters1("a".. "z"); for (my $i = 0; $i < $splitNbr; $i++) { my $FileNew_X = $DIR_X . "\\" $fileNum. $letters[$i]=.txt"; my $FileNew_Y = $DIR_Y . "\\" $fileNum. $letters[$i]=.txt"; my $FileNew_DEV = $DIR_DEV . "\\" $fileNum. $letters[$i]=.txt"; copy($fileX, $FileNew_X) or die "WARNING: copy failed: $!\n"; ---->>>>>ERROR AT NEXT LINE copy($fileY, $FileNew_Y) or die "WARNING: copy failed: $!\n"; copy($fileDEV, $FileNew_DEV) or die "WARNING: copy failed: $!\n"; } 

Any thoughts?

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




I stumbled upon this really nice page from Ruby, describing the language from the perspective of other common programming languages:

https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/

The page is written in a friendly tone, inviting programmers familiar with other programming languages to Ruby. No programming language is being viewed as inferior, quite the contrary: all mentioned languages are praised and even defended from haters, for example:

  • "Perl is awesome. Perl’s docs are awesome. The Perl community is … awesome. For those Perlers who long for elegant OO features built-in from the beginning, Ruby may be for you."
  • "Happily, it turns out that Ruby and C have a healthy symbiotic relationship. And, of course, Ruby itself is written in C."
  • "Java is mature. It’s tested. And it’s fast (contrary to what the anti-Java crowd may still claim)."
  • "Python is another very nice general purpose programming language."

I believe Perl could greatly benefit from having a similar page. With its friendly philosophy and TMTOWTDI, it seems natural to invite programmers from other languages, with an approach of "Don't be afraid to keep programming the way you are used to, if it works in Perl, there are no limits enforced".

Since Perl is now not a common choice for new code or for learning, it makes a lot of sense to bring over people from other languages. Especially in an age where strict conventions seem to be praised, I can see Perl becoming a source of some fresh air.

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



my $MAX_PROCESSES=10; my $pm = Parallel::ForkManager->new($MAX_PROCESSES); while (1) { my $pid=$pm->start and next; print "$$ LOCK \n"; $pm->finish; } $pm->wait_all_children; 

I made this sample piece of code which I basically took from the docs, I only changed to infinite loop but I cannot understand why this would make any different between an infinite loop and iterating through an array for example? Anyway I am fighting this for several hours now trying different versions of my code and cannot find why am I getting "Cannot start another process while you are in the child process" all the time, any hints appreciated

output looks basically like this

Cannot start another process while you are in the child process at .... 16366 LOCK 16367 LOCK 16368 LOCK 16369 LOCK 16370 LOCK 16371 LOCK 16372 LOCK 16373 LOCK 16374 LOCK 16375 LOCK Cannot start another process while you are in the child process at .... 

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




The Joy of DTrace and ModPerl2 submitted by /u/joesuf4
[link] [comments]


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]



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


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]



Some basic stat computations with Perl , Python and RLessons 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.
Well even in these case, the choice of the generator did matter. Note that the fully vectorized #PDL #perl versions were faster than #rstats

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

https://preview.redd.it/qn00sx78gbuc1.png?width=1538&format=png&auto=webp&s=1874b9e710c239e9acea36fb54d957167a69b270

https://preview.redd.it/4by4jbh9gbuc1.png?width=1538&format=png&auto=webp&s=dc9944347983445126e4ab57b43c76202ca719d6

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

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]




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]



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


Perl programming using KDE's Kate editor in Linux tutorial submitted by /u/nmariusp
[link] [comments]


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 for vsearch.

    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 use PDL::FFTW3 instead, PDL::FFT is bundled with PDL for the cases where PDL::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 via Alien::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 of sequence().

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 incorporates PDL::Graphics::PGPLOT module that was in the PDL 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]



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




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]




Amazon Links and Buttons - Perl Hacks submitted by /u/davorg
[link] [comments]


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.

Obligatory XKCD

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!)

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]




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]



submitted by /u/niceperl
[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]




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]



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



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]




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]