line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# This file is part of App-PythonToPerl |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# This software is Copyright (c) 2023 by Auto-Parallel Technologies, Inc. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# This is free software, licensed under: |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# The GNU General Public License, Version 3, June 2007 |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
# [[[ HEADER ]]] |
11
|
|
|
|
|
|
|
# ABSTRACT: a method is a function defined inside of a class |
12
|
|
|
|
|
|
|
#use RPerl; |
13
|
|
|
|
|
|
|
package Python::Method; |
14
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
15
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
53
|
|
16
|
|
|
|
|
|
|
our $VERSION = 0.002_000; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# [[[ OO INHERITANCE ]]] |
19
|
1
|
|
|
1
|
|
10
|
use parent qw(Python::Function); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
20
|
1
|
|
|
1
|
|
50
|
use Python::Function; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
47
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# [[[ CRITICS ]]] |
23
|
|
|
|
|
|
|
## no critic qw(ProhibitUselessNoCritic ProhibitMagicNumbers RequireCheckedSyscalls) # USER DEFAULT 1: allow numeric values & print op |
24
|
|
|
|
|
|
|
## no critic qw(RequireInterpolationOfMetachars) # USER DEFAULT 2: allow single-quoted control characters & sigils |
25
|
|
|
|
|
|
|
## no critic qw(ProhibitConstantPragma ProhibitMagicNumbers) # USER DEFAULT 3: allow constants |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# [[[ INCLUDES ]]] |
28
|
1
|
|
|
1
|
|
5
|
use Perl::Types; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
425
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# [[[ OO PROPERTIES ]]] |
31
|
|
|
|
|
|
|
our hashref $properties = { |
32
|
|
|
|
|
|
|
component_type => my string $TYPED_component_type = 'Python::Method', |
33
|
|
|
|
|
|
|
scope => my string $TYPED_scope = undef, |
34
|
|
|
|
|
|
|
# all other properties inherited from Python::Function |
35
|
|
|
|
|
|
|
}; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# [[[ SUBROUTINES & OO METHODS ]]] |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |