File: CommonMethods.pmt

package info (click to toggle)
libclass-methodmaker-perl 2.25-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 524 kB
  • sloc: perl: 1,849; objc: 492; makefile: 3
file content (17 lines) | stat: -rw-r--r-- 525 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

'INTEGER:*_incr' => sub {
                      my $x = $names{'*'};
                      my $incr = @_ > 1 ? $_[1] : 1;
                      $_[0]->$x($_[0]->$x()+$incr);
                    },

'INTEGER:*_decr' => sub {
                      my $x = $names{'*'};
                      my $decr = @_ > 1 ? $_[1] : 1;
                      $_[0]->$x($_[0]->$x()-$decr);
                    },

'INTEGER:*_zero' => sub {
                      my $x = $names{'*'};
                      $_[0]->$x(0);
                    },