Randal Schwartz is giving his "Half My Life with Perl" talk tomorrow Saturday, December 14, at 5:00 PM - 7:00 PM EST. You can register for the livestream.
I think the video will also be available later, and when I know those details I'll post those too.
submitted by /u/briandfoy
[link] [comments]
Me: oi, there's like a few dozen modules I need to rebuild that have changed their maintainers, so their CPAN paths all changed, now I need to update them all, sounds like a bit of busywork, 'innit?
MetaCPAN: don't fret, we have this nifty feature where you use the /modules/by-module/X/X-Y
paths, and those won't change!
Me: OK mate!
... time passes ...
... I need to rebuild the packages again.
Me: MetaCPAN, mate, do you know why am I getting 404 pages instead of tarballs under all /modules/by-module/...
links? Now I have to change them all back to author-based ones! Sounds like busywork again, 'innit?
MetaCPAN: LOL LMAO
submitted by /u/WesolyKubeczek
[link] [comments]
The Perl Data Language (PDL) has its own Advent Calendar apart from the Perl Advent Calendar.
PDL Advent site (calendar view)
- December 1 - What is Perl Data Language?
- December 2 - Maps with Perl Data Language
- December 3 - Perl Data Language on the Mac
- December 4 - (thread) Interpolation with Perl Data Language
- December 5
- December 6
- December 7
- December 8
- December 9
- December 10
- December 11
- December 12
- December 13
- December 14
- December 15
- December 16
- December 17
- December 18
- December 19
- December 20
- December 21
- December 22
- December 23
- December 24
- December 25
submitted by /u/briandfoy
[link] [comments]
There are a lot of ::Tiny
distributions on CPAN that implement the most needed features of whatever (e.g. YAML::Tiny
and Module::Build::Tiny
) in much smaller and faster to run-time compile modules. It seems that most of the time, accepting the reduced feature set is a good tradeoff for the reduced runtime bloat.
This got me thinking, with how massive CPAN is, containing tons of distributions that implement the same thing in different ways, often resulting in code bloat where Distribution A has dependence B that does Fubar API
one way, and Distribution A also has depencency C that doesn't do Fubar API
but has a test that needs Dependency D that does Fubar API
another way, and so on.
Could we maybe get a "CPAN Tiny" that is a subset of CPAN without all of the massive redundancy bloat? Distributions that go into it can only use Core and/or other "CPAN Tiny" distributions and can not have redundancy. The dependency bloat is major drawback of Perl.
Sometimes to meet one dependency (especially if running tests), well over 20 dependencies with a lot of them having redundant purposes are needed. It's madness. Especially since packagers don't always properly specify runtime dependencies meaning after that big mess is installed, you find you need even more because some dependencies were left out. It's a mess that makes me want to just look for Python solutions.
submitted by /u/AnymooseProphet
[link] [comments]
My wife and have a hobby-level online radio station and we use Logitech Media Server as the backend. As part of what we use we're running a plug-in called Spicefly Sugarcube, which interacts with a "brain" called MusicIP. MusicIP allows music suggestions to be called using an API, which is basically what Sugarcube is doing, and it builds a URL with the very last element being "recipe," which is a filter built into MusicIP that helps shape the direction the songs go.
The issue is I'd like to replace the recipe section of this plug in with a fixed array that cycles through to emulate a radio format clock. I realize that by doing this under the hood I lose the functionality of changing the recipes on the fly, but that's okay.
The program is driven by the
plugin.pm
file located here:
bitbucket.org/spicefly/sugarcu…
I know nothing about Perl so tried to have ChatGPT alter this to replace the recipe section with a fixed array, It returned the upper part of the file this way, with no other changes, and the plug in won't load like this:
#v6.01 - December 2023
#+===================+
#Licencing Requirements Removed
#Released as Open Source under the GNU General Public License v3.0
#
#In Short Summary
#Complete source code must be made available that includes all changes
#Copyright and license notices must be preserved.
#Contributors provide an express grant of patent rights.
package Plugins::SugarCube::Plugin;
# Define the recipe sequence array
my
u/recipe_sequence = ('5s', '4s', '5s', '5s', '4s', '5s', '4s', '5s', '5s', '4s', '5s', '4s', '5s', '5s', '4s', '5s', '5s', '4s');
my $recipe_index = 0;
# Function to get the next recipe in sequence
sub get_next_recipe {
my $recipe = $recipe_sequence[$recipe_index];
$recipe_index = ($recipe_index + 1) %
u/recipe_sequence; # Loop back to the start
return $recipe;
}
use base qw(Slim::Plugin::Base);
use strict;
use Slim::Utils::Misc;
use Slim::Utils::Prefs;
use Slim::Utils::Log;
my $log = Slim::Utils::Log->addLogCategory(
{
'category' => 'plugin.sugarcube',
# 'defaultLevel' => 'WARN',
'defaultLevel' => 'DEBUG',
'description' => getDisplayName(),
}
);
So my question is, is this possible, and is the kernel of how to make it work here, or is there a better way to do it? If you look at the original plugin.pm file you'll see how the URL is built, and I really just want the very end of the URL to be &recipe=5s or %recipe=4s depending on the sequence I enter. Any help it appreciated!
submitted by /u/typecrazy789
[link] [comments]
Mo utilities for email.
Changes for 0.02 - 2024-04-26T23:02:53+02:00
- Add tests for error parameters.
- Rewrite the tests so that the functional tests are first and then the errors.