EPrints Technical Mailing List Archive
Message: #07094
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Overriding subroutines
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Overriding subroutines
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- Date: Tue, 23 Jan 2018 16:12:01 +0000
Hi all, I’m currently trying to override a subroutine from a plugin module, by redefining it in the local cfg.d file. So <EPRINTS_ROOT>/lib/plugins/EPrints/Plugin/Screen/MyPlugin/Stuff.pm
has package EPrints::Plugin::Screen::MyPlugin::Stuff; sub method_name { print 1;} and in <EPRINTS_ROOT>/archives/<MY_ARCHIVE>/cfg/cfg.d/zzz_stuff_plugin_local.pl I have package EPrints::Plugin::Screen::MyPlugin::Stuff; sub method_name { print 2;} when I restart the server I get the print 1; statement. If I change the subroutine name in the plugin (under lib/plugins….) then restart the server I get the print 2; statement so it appears to be loading the plugin after the local version?
I thought these happened the other way round? Thanks, Alan |
- Follow-Ups:
- [EP-tech] Overriding subroutines
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- [EP-tech] Overriding subroutines
- References:
- [EP-tech] Overriding subroutines
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- [EP-tech] Overriding subroutines
- Prev by Date: [EP-tech] setup ssl eprints
- Next by Date: Re: [EP-tech] Overriding subroutines
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):