File: 3.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 (13 lines) | stat: -rw-r--r-- 465 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
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",
							   only        => ["Foo::Two"];
ok(eq_set([Foo->test_plugins],
    ["Foo::Two"]), "We have one test plugin");

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