As you may know, the release of a new version of Perl triggers the process to elect a new Perl Steering Council. That process has been taking place over the last few weeks and the results were announced a few days ago.
Congratulations to returning members Philip Bruhat and Graham Knop and to new member Aristotle Pagaltzis. And many thanks to retiring member Paul Evans.
https://psc.perlhacks.com/#members
submitted by /u/davorg
[link] [comments]
An analyzer has been implemented for the Perl track on exercism.org. Currently it uses Perl::Critic to give feedback when a user submits an implementation of an exercise.
The list of policies in use is quite lean at the moment, but hopefully the feedback should prove useful to newbies getting to grips with Perl!
submitted by /u/m_dango
[link] [comments]
Analyzers | Exercism's Docs
Exercism's analyzers automatically assess student's submissions and provide mentor-style commentary. Contributing to Analyzers Each language has it...Exercism
I'm using h2xs
to make glue code for a C library to a module. Imagine this scenario in the C header:
struct foo; struct foo * new_foo(); void set_foo_member(struct foo * f, int value); int get_foo_member(const struct foo * f);
When I run
h2xs -x
on this I get something like this in the .xs file:struct foo * new_foo() int get_foo_member(f) const struct foo * f void set_foo_member(f, value) struct foo * f int value
and in the
typemap
:const struct foo * T_PTROBJ struct foo * T_PTROBJ
This builds fine, however, when I go to actually use the code like this:
my $foo = new_foo(); $foo->set_foo_member(123); print "Foo member is: " . $foo->get_foo_member();
I get an error like the following:
get_foo_member: Expected f to be of type const struct FooPtr; got struct FooPtr=SCALAR(0x2ecd9c2dd768) instead at ...
Right, so, that's the backstory. XS checks the type of incoming objects and makes sure they match the expected type from the C header, and if they differ, it throws an error. But it seems to be considering
struct foo *
and const struct foo *
to be two different types, even though they're not (really). Perl shouldn't care about this at all.What's the solution here? Do I remove all const
keywords in my XS code? Is there some switch or setting to make xsubpp
treat both as the same type? Something else?
submitted by /u/greg_kennedy
[link] [comments]
I have a Perl script that takes several hours to run, I need to know when it's done, but I sometimes forget to keep checking.
It's running on Strawberry in Windows Server 2019. How easy would it be to write another script to send an email? I could run them as a batch I'm thinking.
I'm very weak at programming, I really only dabble.
submitted by /u/Hydraulis
[link] [comments]
It's gotta be me, but I'm at a loss. Installing with cpan: I can build XML::LibXML (lots of warnings) but the test suite refuses to run cleanly, staring with errors:
t/02parse.t ........................................ 1/533
# Failed test 'error parsing <!DOCTYPE X SYSTEM "example/ext\_ent.dtd">
# <X>\&foo;</X>
# '
# at t/02parse.t line 887.
# got: ''
# expected: anything else
# Looks like you failed 1 test of 533.
`
and then getting worse from there.
I've installed the module on other Macs including other Intel boxes.
I've re-installed MacPorts (which is what I used to install LibXML2 and all the other prereqs).
I've built from source - same experience. Build succeeds, tests all fail.
I'm trying to figure out how to run the tests individually to see what's going on in better detail, but if anyone has seen and solved this funky issue of getting XML::LibXML to build and run cleanly on Mac OSX, please -I'd love to hear it. Everything else builds/tests/installs fine. reports does show some failed Mac builds.
submitted by /u/OS2REXX
[link] [comments]