Skip to main content




I am on Windows 11: with Strawberry Perl

I have been trying to get this working on JetBrains IntelliJ with an extension and with Microsoft Visual Code with extensions. (Apparently the Perl Language Server has issues running in Windows. At least from the documentation I found, it recommends running it all i the WSL2)

In some langues the code editor can offer you guidance with what parameters a function may want

So if I type in

lc <$string> DBI->connect($data_source, $username, $auth, \%attr); DBI->connect($data_source, $username, $auth, \%attr);

DBI-> (I would like a guide here to show me what functions and what not available)

DBi->Connect(

It would show DBI->connect($data_source, $username, $auth, \%attr); For instance

Now JetBrains if I control click on an object or function it pulls up the sourcecode (I think) for it in a new editor window. This is helpful but far more intrusive and slow.

I would expect an argument may be that it is difficult with Perl to know exactly how many parameters a function can take. I can see that. However in Perl documentation there are usually a few example shown. Even linking those would be great.

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





I just added a "migration guide" of sorts, for rewriting code from classical Perl style to Object::Pad, perhaps as a first step towards using the new feature 'class' syntax of Perl 5.38 onwards.

metacpan.org/dist/Object-Pad/v…

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




The URI module took a short holiday, but quickly returned. Just for giggles, I'd like to see everyone react (positivily) to u/oalders in the Github issue:

  • Can we get 100 reactions?
  • Can we get all the reactions (so, thumbs down is really just for completeness)
  • Can we star the heck out of the libperl-www repo?

There are people who take care of things so most people never notice when something goes wrong, and from the time I reported this to resolution was three hours (although the issue was already known, I think). That's some pretty good support right there, and we should fête over that.

For what it's worth, GitHub pays attention to these things. When I filed an issue about getting them to think about putting Perl in their Advisory Database, the number of reactions that issue got made them think about it (right now it's a whole process with scheduling dev time, etc). One of the ways to show that Perl is alive is to react to Perl things (um, that deserve it, not bot spam!).

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



Hello,

I'm trying to install Request Tracker and in the process am receiving an error that states:

Some dependencies were missing:
DBD::mysql >= 2.1018, != 4.042 ................... MISSING

I'm lost. How to do I resolve this?

Thank you!

submitted by /u/ngrybst
[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.