EPrints Technical Mailing List Archive

Message: #01240


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Problem with the RSS plugin


Hi Seb,

I've tried all the options, but get the same error

./generate_apacheconf --verbose
Can't locate object method "new" via package "EPrints::Plugin::Export::ALLRSS" (perhaps you forgot to load "EPrints::Plugin::Export::ALLRSS"?) at /usr/share/eprints3/bin/../perl_lib/EPrints/PluginFactory.pm line 242.

My live eprints is 3.2.3, but I'm testing on 3.3.6.

Is there anything I need to edit at the beginning of the ALLRSS plugin ?

package EPrints::Plugin::Export::AllRSS;
use EPrints::Plugin::Export;
@ISA = ( "EPrints::Plugin::Export" );
use strict;

Regards,
Malcolm.

________________________________________
From: eprints-tech-bounces@ecs.soton.ac.uk [eprints-tech-bounces@ecs.soton.ac.uk] on behalf of Sebastien Francois [sf2@ecs.soton.ac.uk]
Sent: 23 October 2012 16:15
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: Problem with the RSS plugin

On 23/10/12 15:01, Ian Stuart wrote:
> On 23/10/12 15:01, Sebastien Francois wrote:
>> Hi Malcolm:
>>
>> You can copy .pm files to:
>>
>> 1- perl_lib/EPrints/Plugin/ .... -> usually considered "hacky" as you're
>> changing the core. It will work but as PERL told you, you need to first
>> "use" the plugin somewhere (usually this is done in perl_lib/EPrints.pm
>> -> add "use EPrints::Plugin::Export::ALLRSS" there and restart the web
>> server). But see, you've just patched a core file (EPrints.pm).
>>
>> 2- (EPrints 3.1+) local archive:
>> archives/{id}/cfg/plugins/EPrints/Plugin/Export/ -> nothing else required
>>
>> 3- (EPrints 3.3+) the bazaar directory:
>> lib/plugins/EPrints/Plugin/Export/ - this time you need to explicitly
>> enable that plugin in your local conf, something like:
>>
>> $c->{plugins}{"Export::ALLRSS"}{params}{disable} = 0;
>>
>> and restart the web server.
>>
>> If you have only one repository running in your EPrints install, I would
>> go for option #2. If more than one, option #3.
> Isn't that the other way around?
>
> lib/plugins/EPrints/Plugin/Export/ is global, therefore all repos will
> pick it up.
>
> archives/{id}/cfg/plugins/EPrints/Plugin/Export/ is specific to the
> repo, therefore properly localised
I don't think I said otherwise.

-> lib/plugins/... is global but won't be picked up locally unless
explicitly enabled in the local conf.

-> archives/{id}/.... appears local but the truth is that if you have
two repositories with the same "local" plugin only one will be loaded
globally (namespace clash) so if repo1 makes a change to their "local"
version, repo2 will inherit the change because at the end of the day,
the same process (modperl) cannot load twice the same package/module.

Having a plugin in archives/{id}/... does not guarantee it's localised
(that's why the bazaar doesn't install stuff there).

Seb.











*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
The University of Westminster is a charity and a company limited by guarantee. Registration number: 977818 England. Registered Office: 309 Regent Street, London W1B 2UW.