| 1 | package OPTIMADE::Filter::Boolean; | ||||||||||
| 2 | |||||||||||
| 3 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 5 | ▶ | use parent 'OPTIMADE::Filter::Modifiable'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 5 | our $VERSION = '0.11.0'; # VERSION | |||||||||
| 9 | |||||||||||
| 10 | 28 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 11 | 28 | my( $class, $value ) = @_; | |||||||||
| 12 | 28 | return bless { value => $value }, $class; | |||||||||
| 13 | } | ||||||||||
| 14 | |||||||||||
| 15 | sub to_filter | ||||||||||
| 16 | 28 | ▶ | { | ||||||||
|
Subroutine
to_filter: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 17 | 28 | my $self = shift; | |||||||||
| 18 | 28 | ▶ | return $self->{value} ? 'TRUE' : 'FALSE'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | sub to_SQL | ||||||||||
| 22 | 10 | ▶ | { | ||||||||
|
Subroutine
to_SQL: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 23 | 10 | die "no SQL representation\n"; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | sub modify | ||||||||||
| 27 | 0 | ▶ | { | ||||||||
|
Subroutine
modify: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 28 | 0 | my $self = shift; | |||||||||
| 29 | 0 | my $code = shift; | |||||||||
| 30 | |||||||||||
| 31 | 0 | return $code->( $self, @_ ); | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 5 | 1; | |||||||||