View | Details | Raw Unified | Return to bug 19081
Collapse All | Expand All

(-)a/Koha/Plugins.pm (-3 / +7 lines)
Lines 74-80 sub GetPlugins { Link Here
74
    my @plugins;
74
    my @plugins;
75
75
76
    foreach my $plugin_class (@plugin_classes) {
76
    foreach my $plugin_class (@plugin_classes) {
77
        if ( can_load( modules => { $plugin_class => undef } ) ) {
77
        my $plugin_file = $plugin_class;
78
        $plugin_file =~ s|::|/|g; $plugin_file .= '.pm';
79
80
        if ( can_load( modules => { $plugin_class => undef }, nocache => 1 ) ) {
78
            next unless $plugin_class->isa('Koha::Plugins::Base');
81
            next unless $plugin_class->isa('Koha::Plugins::Base');
79
82
80
            my $plugin = $plugin_class->new({ enable_plugins => $self->{'enable_plugins'} });
83
            my $plugin = $plugin_class->new({ enable_plugins => $self->{'enable_plugins'} });
Lines 87-93 sub GetPlugins { Link Here
87
                and any { !$plugin_metadata->{$_} || $plugin_metadata->{$_} ne $req_metadata->{$_} } keys %$req_metadata;
90
                and any { !$plugin_metadata->{$_} || $plugin_metadata->{$_} ne $req_metadata->{$_} } keys %$req_metadata;
88
            push @plugins, $plugin;
91
            push @plugins, $plugin;
89
        } else {
92
        } else {
90
            warn $Module::Load::Conditional::ERROR;
93
            my $error = $Module::Load::Conditional::ERROR;
94
            # Do not warn the error if the plugin has been uninstalled
95
            warn $error unless $error =~ m|^Could not find or check module '$plugin_class'|;
91
        }
96
        }
92
    }
97
    }
93
    return @plugins;
98
    return @plugins;
94
- 

Return to bug 19081