File: TestFoo.pm

package info (click to toggle)
libsyntax-perl 0.004-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 132 kB
  • ctags: 13
  • sloc: perl: 162; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 382 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use strict;
use warnings;

package Syntax::Feature::TestFoo;

our %CALL;

sub uninstall {
    my ($class, %args) = @_;

    $CALL{uninstall}++;
    return 1;
}

sub install {
    my ($class, %args) = @_;

    my $target  = $args{into};
    my $options = $args{options};

    no strict 'refs';
    *{ "${target}::foo" } = sub { $options };

    $CALL{install}++;
    return 1;
}

1;