~ubuntu-branches/ubuntu/vivid/libfennec-perl/vivid

« back to all changes in this revision

Viewing changes to lib/Fennec/Manual/CustomFennec.pod

  • Committer: Package Import Robot
  • Author(s): gregor herrmann
  • Date: 2014-05-03 15:29:37 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20140503152937-zam2kihdcy945sw0
Tags: 2.017-1
* Team upload.
* New upstream release.
* Add (build) dependency on libchild-perl (>= 0.010).
* Build-Depend on newer Module::Build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        return %params;
36
36
    }
37
37
 
 
38
    sub after_import {
 
39
        my $class = shift;
 
40
        my ($info) = @_;
 
41
        # $info is a hashref with the importer, runner, and importer meta
 
42
        # object, and some other fun things.
 
43
 
 
44
        # Example of adding cases to any Fennec test that uses this subclass:
 
45
        # The first arg to add case should be an array matching the return of
 
46
        # caller. The idea is to give us the start and end line, as well as
 
47
        # file name where the case is defined. normally the exports from
 
48
        # Test::Workflow provide that for you, but at this low-level we need to
 
49
        # provide it ourselfs. Since we define the subs here, we give current
 
50
        # line/file. Use the importer for package name.
 
51
        $info->{layer}->add_case([$info->{importer}, __FILE__, __LINE__], case_a => sub { $main::CASE_A = 1 });
 
52
        $info->{layer}->add_case([$info->{importer}, __FILE__, __LINE__], case_b => sub { $main::CASE_B = 1 });
 
53
    }
 
54
 
38
55
    1;
39
56
 
40
57
=head1 CUSTOM COLLECTOR