first commit

This commit is contained in:
douboer
2026-09-30 15:05:17 +08:00
commit 34cf39dfe3
1288 changed files with 118174 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;