first commit

This commit is contained in:
douboer
2025-09-17 16:08:16 +08:00
parent 9395faa6b2
commit 3ff47c11d5
1318 changed files with 117477 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
###
### FlatDB_Overloaded.pm
###
## Chapter 7 section 4.1
package FlatDB_Overloaded;
BEGIN {
for my $f (qw(and or without)) {
*{"query_$f"} = \&{"FlatDB_Composable::query_$f"};
}
}
use base 'FlatDB_Composable';
sub query {
$self = shift;
my $q = $self->SUPER::query(@_);
bless $q => __PACKAGE__;
}
sub callbackquery {
$self = shift;
my $q = $self->SUPER::callbackquery(@_);
bless $q => __PACKAGE__;
}
1;
## Chapter 7 section 4.1
use overload '|' => \&query_or,
'&' => \&query_and,
'-' => \&query_without,
'fallback' => 1;