File: 2.t

package info (click to toggle)
libmodule-pluggable-ordered-perl 1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 80 kB
  • ctags: 11
  • sloc: perl: 63; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package Foo;
use Test::More tests => 3;
use lib 't/modules/';
use Module::Pluggable::Ordered search_dirs => ['t/modules'], 
                               search_path => ['Foo'],
                               sub_name    => "test_plugins",
							   except      => ["Foo::One"];


ok(eq_set([Foo->test_plugins],
    ["Foo::Two", "Foo::Three"]), "We have two test plugins");

$main::order = 1;
Foo->call_plugins("mycallback");
is($main::order, 2, "Only two plugins have been called");