View Full Version : Re: [slim] plugins

Kevin Deane-Freeman
2003-11-13, 13:41
I'm bouncing this into dev group becuase it would seem this is a better home at
this point.

Quoting Jack Coates <jack (AT) monkeynoodle (DOT) org>:

> On Thu, 2003-11-13 at 12:04, Kevin Deane-Freeman wrote:
> > Quoting Jason Snell <jsnell (AT) macworld (DOT) com>:
> >
> > > Kevin Deane-Freeman wrote:
> > >
> > > >You probably aren't doing anything wrong. Many plugins require added
> Perl
> > > >modules. If these are not present, hooking the plugin into the main
> > > >server will
> > > >fail.
> > >
> > > I've said it before and I'll say it again: I think it would be
> > > _awesome_ if someone (Slim Devices maybe, even?) would come up with a
> > > system to make plug-ins more accessible to the masses. I've been
> > > intrigued by many of these plug-ins, but my attempts to use CPAN to
> > > install modules on Mac OS X have largely been met with crushing
> > > failure. It would be nice if there was some system to bind up these
> > > plug-ins so that non-perl heads could take advantage of their
> > > features. The radio browser alone would be a major boost to the value
> > > of the Slimp3 product if it were more widely accessible..
> >
> > I agree, it would be wonderful. I have no idea HOW it could be done,
> however.
> > Either the main executable for Windows and OSX have to be compiled with the
> more
> > common modules included OR the executable would need to have some sort of
> hook
> > to dynamically load external perl modules. My guess is the former would
> make
> > the main executable much larger than it already is, without being of
> direct
> > benefit to likely a large portion of the user base. The latter would
> likely be
> > near equivalent to turning the executable into a standalone perl
> interpreter.
> >
> > -kdf
> Or the plugins could have a copy of the module inserted directly;
> nightmare to maintain, but it would work.
> Or the executable could contain CPAN.pm and an error catcher that tries
> to install a module if it is called but not around. Yech. Don't even
> know if that would work, I've never messed with perl2exe.

Given that the plugins can be loaded by the EXE, it should be possible to load
other modules. The code automatically loads any .pm file in teh plugins
directory. What if the server could also get a hold of the requirements for
each modules...and look to find them in plugins/CPAN if they are not found
anywhere else? Maybe done in such a way that they appear to be included as part
of the module. This would avoid having duplicate modules in each plugin, and
the perl core would never know the difference.

Having very little experience with the EXE and absolutely none with OSX version,
I dont really know if this is even possible. I'm just assuming the plugins even
get loaded. Maybe I'm extrapolating too much to think that other modules could
load as well.

I have heard that some windows users have managed to get some plugins to work,
but I dont recall if any have come back to give details on exactly HOWQ it was
done :)