| 1 | ##---------------------------------------------------------------------------- | ||
| 2 | ## Database Object Interface - ~/lib/DB/Object/Query/Elements.pm | ||
| 3 | ## Version v0.2.0 | ||
| 4 | ## Copyright(c) 2023 DEGUEST Pte. Ltd. | ||
| 5 | ## Author: Jacques Deguest <jack@deguest.jp> | ||
| 6 | ## Created 2023/07/08 | ||
| 7 | ## Modified 2026/03/22 | ||
| 8 | ## All rights reserved | ||
| 9 | ## | ||
| 10 | ## | ||
| 11 | ## This program is free software; you can redistribute it and/or modify it | ||
| 12 | ## under the same terms as Perl itself. | ||
| 13 | ##---------------------------------------------------------------------------- | ||
| 14 | package DB::Object::Query::Elements; | ||
| 15 | BEGIN | ||
| 16 | { | ||
| 17 | use strict; | ||
| 18 | use common::sense; | ||
| 19 | use parent qw( Module::Generic ); | ||
| 20 | use vars qw( $VERSION $EXCEPTION_CLASS ); | ||
| 21 | our $EXCEPTION_CLASS = $DB::Object::EXCEPTION_CLASS; | ||
| 22 | our $VERSION = 'v0.2.0'; | ||
| 23 | }; | ||
| 24 | |||
| 25 | use strict; | ||
| 26 | use warnings; | ||
| 27 | |||
| 28 | sub init | ||
| 29 | { | ||
| 30 | my $self = shift( @_ ); | ||
| 31 | $self->{elements} = []; | ||
| 32 | $self->{query_object} = undef; | ||
| 33 | $self->{_init_strict_use_sub} = 1; | ||
| 34 | $self->{_exception_class} = $EXCEPTION_CLASS; | ||
| 35 | $self->SUPER::init( @_ ) || return( $self->pass_error ); | ||
| 36 | $self->{_fields} = [qw( elements )]; | ||
| 37 | $self->{_cache_fields} = ''; | ||
| 38 | $self->{_cache_formats} = ''; | ||
| 39 | $self->{_cache_types} = ''; | ||
| 40 | $self->{_cache_values} = ''; | ||
| 41 | return( $self ); | ||
| 42 | } | ||
| 43 | |||
| 44 | # We attach this elements collection to its query object | ||
| 45 | sub attach | ||
| 46 | { | ||
| 47 | my $self = shift( @_ ); | ||
| 48 | # Query object | ||
| 49 | my $qo = shift( @_ ) || | ||
| 50 | return( $self->error( "No DB::Object::Query object was provided." ) ); | ||
| 51 | unless( $self->_is_a( $qo => 'DB::Object::Query' ) ) | ||
| 52 | { | ||
| 53 | return( $self->error( "Value provided is not a DB::Object::Query object." ) ); | ||
| 54 | } | ||
| 55 | $self->query_object( $qo ) || return( $self->pass_error ); | ||
| 56 | $self->debug( $qo->debug ); | ||
| 57 | # We propagate ourself to all the elements in the collection. | ||
| 58 | if( my $elems = $self->elements ) | ||
| 59 | { | ||
| 60 | foreach my $elem ( @$elems ) | ||
| 61 | { | ||
| 62 | $elem->attach( $self ); | ||
| 63 | } | ||
| 64 | } | ||
| 65 | return( $self ); | ||
| 66 | } | ||
| 67 | |||
| 68 | # This is used to forward unknown method to Module::Generic::Array | ||
| 69 | sub autoload | ||
| 70 | { | ||
| 71 | my $self = shift( @_ ); | ||
| 72 | my $meth = shift( @_ ) || return; | ||
| 73 | my $elems = $self->elements || return; | ||
| 74 | my $code; | ||
| 75 | if( $code = $elems->can( $meth ) ) | ||
| 76 | { | ||
| 77 | no strict 'refs'; | ||
| 78 | my $sub = sub | ||
| 79 | { | ||
| 80 | my $this = shift( @_ ); | ||
| 81 | return( $code->( $this->elements, @_ ) ); | ||
| 82 | }; | ||
| 83 | *$meth = $sub; | ||
| 84 | return( $sub ); | ||
| 85 | } | ||
| 86 | warn( "No method '$meth' supported by this class ", ref( $self ), " or by ", ref( $elems ) ); | ||
| 87 | return; | ||
| 88 | } | ||
| 89 | |||
| 90 | # NOTE: sub clone is inherited from Module::Generic | ||
| 91 | |||
| 92 | sub elements { return( shift->reset(@_)->_set_get_object_array_object( 'elements', 'DB::Object::Query::Element', @_ ) ); } | ||
| 93 | |||
| 94 | sub fields | ||
| 95 | { | ||
| 96 | my $self = shift( @_ ); | ||
| 97 | return( $self->{_cache_fields} ) if( $self->{_cache_fields} && !CORE::length( $self->{_reset} // '' ) ); | ||
| 98 | my $arr = $self->new_array; | ||
| 99 | my $e = $self->elements; | ||
| 100 | $e->foreach(sub | ||
| 101 | { | ||
| 102 | my $o = shift( @_ ); | ||
| 103 | $arr->push( defined( $o ) ? $o->field : undef ); | ||
| 104 | }); | ||
| 105 | $self->{_cache_fields} = $arr; | ||
| 106 | CORE::delete( $self->{_reset} ); | ||
| 107 | return( $arr ); | ||
| 108 | } | ||
| 109 | |||
| 110 | sub for { return( shift->elements->for( @_ ) ); } | ||
| 111 | |||
| 112 | sub foreach { return( shift->elements->foreach( @_ ) ); } | ||
| 113 | |||
| 114 | sub formats | ||
| 115 | { | ||
| 116 | my $self = shift( @_ ); | ||
| 117 | return( $self->{_cache_formats} ) if( $self->{_cache_formats} && !CORE::length( $self->{_reset} // '' ) ); | ||
| 118 | my $arr = $self->new_array; | ||
| 119 | my $e = $self->elements; | ||
| 120 | $e->foreach(sub | ||
| 121 | { | ||
| 122 | my $o = shift( @_ ); | ||
| 123 | $arr->push( defined( $o ) ? $o->format : undef ); | ||
| 124 | }); | ||
| 125 | $self->{_cache_formats} = $arr; | ||
| 126 | CORE::delete( $self->{_reset} ); | ||
| 127 | return( $arr ); | ||
| 128 | } | ||
| 129 | |||
| 130 | sub generics | ||
| 131 | { | ||
| 132 | my $self = shift( @_ ); | ||
| 133 | return( $self->{_cache_generics} ) if( $self->{_cache_generics} && !CORE::length( $self->{_reset} // '' ) ); | ||
| 134 | my $arr = $self->new_array; | ||
| 135 | my $e = $self->elements; | ||
| 136 | $e->foreach(sub | ||
| 137 | { | ||
| 138 | my $o = shift( @_ ); | ||
| 139 | $arr->push( defined( $o ) ? $o->generic : '?' ); | ||
| 140 | }); | ||
| 141 | $self->{_cache_generics} = $arr; | ||
| 142 | CORE::delete( $self->{_reset} ); | ||
| 143 | return( $arr ); | ||
| 144 | } | ||
| 145 | |||
| 146 | sub is_empty { return( shift->elements->is_empty ); } | ||
| 147 | |||
| 148 | sub length { return( shift->elements->length ); } | ||
| 149 | |||
| 150 | # This merge one or more objects of the same class into this one | ||
| 151 | sub merge | ||
| 152 | { | ||
| 153 | my $self = shift( @_ ); | ||
| 154 | my $elems = $self->elements; | ||
| 155 | CORE::foreach my $this ( @_ ) | ||
| 156 | { | ||
| 157 | if( !$self->_is_a( $this => 'DB::Object::Query::Elements' ) ) | ||
| 158 | { | ||
| 159 | warn( "Element provided '", overload::StrVal( $this ), "' is not an DB::Object::Query::Elements or DB::Object::Query::Clause object" ); | ||
| 160 | next; | ||
| 161 | } | ||
| 162 | |||
| 163 | $elems->push( $this->elements->list ); | ||
| 164 | } | ||
| 165 | # Make sure our elements are in the right order | ||
| 166 | $self->_sort; | ||
| 167 | $self->reset(1) if( scalar( @_ ) ); | ||
| 168 | return( $self ); | ||
| 169 | } | ||
| 170 | |||
| 171 | sub new_element | ||
| 172 | { | ||
| 173 | my $self = shift( @_ ); | ||
| 174 | my $el = $self->query_object->new_element( @_ ) || | ||
| 175 | return( $self->pass_error( $self->query_object->error ) ); | ||
| 176 | return( $el ); | ||
| 177 | } | ||
| 178 | |||
| 179 | sub push | ||
| 180 | { | ||
| 181 | my $self = shift( @_ ); | ||
| 182 | my $e = $self->elements; | ||
| 183 | CORE::foreach my $elem ( @_ ) | ||
| 184 | { | ||
| 185 | my( $o ); | ||
| 186 | # This works also for DB::Object::Query::Clause that inherits from DB::Object::Query::Elements | ||
| 187 | if( $self->_is_a( $elem => 'DB::Object::Query::Elements' ) ) | ||
| 188 | { | ||
| 189 | $self->push( $elem->elements->list ); | ||
| 190 | next; | ||
| 191 | } | ||
| 192 | elsif( $self->_is_a( $elem => 'DB::Object::Query::Element' ) ) | ||
| 193 | { | ||
| 194 | $o = $elem; | ||
| 195 | } | ||
| 196 | elsif( ref( $elem ) eq 'HASH' ) | ||
| 197 | { | ||
| 198 | $o = $self->new_element( %$elem ) || return( $self->pass_error ); | ||
| 199 | } | ||
| 200 | else | ||
| 201 | { | ||
| 202 | return( $self->error( "Unknown value '", ( $elem // 'undef' ), "' to add as element to our clause elements stack." ) ); | ||
| 203 | } | ||
| 204 | |||
| 205 | # Order does not really matter, we just stack them, and after we will sort them by their object property 'index' value, if necessary | ||
| 206 | $e->push( $o ); | ||
| 207 | } | ||
| 208 | # Make sure our elements are in the right order | ||
| 209 | $self->_sort; | ||
| 210 | $self->reset(1) if( scalar( @_ ) ); | ||
| 211 | return( $self ); | ||
| 212 | } | ||
| 213 | |||
| 214 | sub query_object { return( shift->_set_get_object( 'query_object', 'DB::Object::Query', @_ ) ); } | ||
| 215 | |||
| 216 | sub reset | ||
| 217 | { | ||
| 218 | my $self = shift( @_ ); | ||
| 219 | if( !CORE::length( $self->{_reset} // '' ) && scalar( @_ ) ) | ||
| 220 | { | ||
| 221 | $self->{_reset} = scalar( @_ ); | ||
| 222 | } | ||
| 223 | return( $self ); | ||
| 224 | } | ||
| 225 | |||
| 226 | sub sort | ||
| 227 | { | ||
| 228 | my $self = shift( @_ ); | ||
| 229 | my $elems = $self->elements->sort(sub | ||
| 230 | { | ||
| 231 | my( $a, $b ) = @_; | ||
| 232 | return( $a->index <=> $b->index ); | ||
| 233 | }); | ||
| 234 | my $clone = $self->clone; | ||
| 235 | $clone->elements( $elems ); | ||
| 236 | return( $clone ); | ||
| 237 | } | ||
| 238 | |||
| 239 | sub types | ||
| 240 | { | ||
| 241 | my $self = shift( @_ ); | ||
| 242 | return( $self->{_cache_types} ) if( $self->{_cache_types} && !CORE::length( $self->{_reset} // '' ) ); | ||
| 243 | my $arr = $self->new_array; | ||
| 244 | my $e = $self->elements; | ||
| 245 | $e->foreach(sub | ||
| 246 | { | ||
| 247 | my $o = shift( @_ ); | ||
| 248 | $arr->push( defined( $o->type ) ? $o : undef ); | ||
| 249 | }); | ||
| 250 | $self->{_cache_types} = $arr; | ||
| 251 | CORE::delete( $self->{_reset} ); | ||
| 252 | return( $arr ); | ||
| 253 | } | ||
| 254 | |||
| 255 | sub values | ||
| 256 | { | ||
| 257 | my $self = shift( @_ ); | ||
| 258 | return( $self->{_cache_values} ) if( $self->{_cache_values} && !CORE::length( $self->{_reset} // '' ) ); | ||
| 259 | my $arr = $self->new_array; | ||
| 260 | my $e = $self->elements; | ||
| 261 | $e->foreach(sub | ||
| 262 | { | ||
| 263 | my $o = shift( @_ ); | ||
| 264 | $arr->push( defined( $o ) ? $o->value : undef ); | ||
| 265 | }); | ||
| 266 | $self->{_cache_values} = $arr; | ||
| 267 | CORE::delete( $self->{_reset} ); | ||
| 268 | return( $arr ); | ||
| 269 | } | ||
| 270 | |||
| 271 | sub _sort | ||
| 272 | { | ||
| 273 | my $self = shift( @_ ); | ||
| 274 | my $e = $self->elements; | ||
| 275 | my $el; | ||
| 276 | # We check the first element to decide whether the placeholders, if any, are numbered or not. | ||
| 277 | $e->foreach(sub | ||
| 278 | { | ||
| 279 | my $this = shift( @_ ); | ||
| 280 | if( $self->_is_object( $this ) && | ||
| 281 | $self->_can( $this => 'is_numbered' ) && | ||
| 282 | $this->is_numbered ) | ||
| 283 | { | ||
| 284 | $el = $this; | ||
| 285 | return(0); | ||
| 286 | } | ||
| 287 | }); | ||
| 288 | if( $el && $el->placeholder && $el->is_numbered ) | ||
| 289 | { | ||
| 290 | my $sorted = $self->sort->elements; | ||
| 291 | $self->elements( $sorted ) if( $sorted ); | ||
| 292 | } | ||
| 293 | return( $self ); | ||
| 294 | } | ||
| 295 | |||
| 296 | sub FREEZE | ||
| 297 | { | ||
| 298 | my $self = CORE::shift( @_ ); | ||
| 299 | my $serialiser = CORE::shift( @_ ) // ''; | ||
| 300 | my $class = CORE::ref( $self ); | ||
| 301 | |||
| 302 | # We keep a strict allow-list to avoid accidentally freezing DBI handles or other | ||
| 303 | # process-local state. | ||
| 304 | my @props = @{$self->{_fields}}; | ||
| 305 | |||
| 306 | my $hash = {}; | ||
| 307 | foreach my $prop ( @props ) | ||
| 308 | { | ||
| 309 | if( CORE::exists( $self->{ $prop } ) && | ||
| 310 | defined( $self->{ $prop } ) && | ||
| 311 | CORE::ref( $self->{ $prop } ) ne 'CODE' ) | ||
| 312 | { | ||
| 313 | $hash->{ $prop } = $self->{ $prop }; | ||
| 314 | } | ||
| 315 | } | ||
| 316 | |||
| 317 | # Return an array reference rather than a list so this works with Sereal and CBOR. | ||
| 318 | # Before Sereal version 4.023, Sereal did not support multiple values returned. | ||
| 319 | if( $serialiser eq 'Sereal' ) | ||
| 320 | { | ||
| 321 | require Sereal::Encoder; | ||
| 322 | require version; | ||
| 323 | |||
| 324 | if( version->parse( Sereal::Encoder->VERSION ) < version->parse( '4.023' ) ) | ||
| 325 | { | ||
| 326 | CORE::return( [$class, $hash] ); | ||
| 327 | } | ||
| 328 | } | ||
| 329 | |||
| 330 | # But Storable wants a list with the first element being the serialised element | ||
| 331 | CORE::return( $class, $hash ); | ||
| 332 | } | ||
| 333 | |||
| 334 | sub STORABLE_freeze { return( shift->FREEZE( @_ ) ); } | ||
| 335 | |||
| 336 | sub STORABLE_thaw { return( shift->THAW( @_ ) ); } | ||
| 337 | |||
| 338 | sub THAW | ||
| 339 | { | ||
| 340 | # STORABLE_thaw would issue $cloning as the 2nd argument, while CBOR would issue | ||
| 341 | # 'CBOR' as the second value. | ||
| 342 | my( $self, undef, @args ) = @_; | ||
| 343 | my $ref = ( CORE::scalar( @args ) == 1 && CORE::ref( $args[0] ) eq 'ARRAY' ) ? CORE::shift( @args ) : \@args; | ||
| 344 | my $class = ( CORE::defined( $ref ) && CORE::ref( $ref ) eq 'ARRAY' && CORE::scalar( @$ref ) > 1 ) ? CORE::shift( @$ref ) : ( CORE::ref( $self ) || $self ); | ||
| 345 | my $hash = CORE::ref( $ref ) eq 'ARRAY' ? CORE::shift( @$ref ) : {}; | ||
| 346 | my $new; | ||
| 347 | # Storable pattern requires to modify the object it created rather than returning a new one | ||
| 348 | if( CORE::ref( $self ) ) | ||
| 349 | { | ||
| 350 | foreach( CORE::keys( %$hash ) ) | ||
| 351 | { | ||
| 352 | $self->{ $_ } = CORE::delete( $hash->{ $_ } ); | ||
| 353 | } | ||
| 354 | $new = $self; | ||
| 355 | } | ||
| 356 | else | ||
| 357 | { | ||
| 358 | $new = CORE::bless( $hash => $class ); | ||
| 359 | } | ||
| 360 | CORE::return( $new ); | ||
| 361 | } | ||
| 362 | |||
| 363 | 1; | ||
| 364 | # NOTE: POD | ||
| 365 | __END__ | ||
| 366 | |||
| 367 | =encoding utf-8 | ||
| 368 | |||
| 369 | =head1 NAME | ||
| 370 | |||
| 371 | DB::Object::Query::Elements - Query Elements Manipulation Class | ||
| 372 | |||
| 373 | =head1 SYNOPSIS | ||
| 374 | |||
| 375 | use DB::Object::Query::Elements; | ||
| 376 | my $elems = DB::Object::Query::Elements->new( debug => 4 ) || | ||
| 377 | die( DB::Object::Query::Elements->error ); | ||
| 378 | $elems->push( $new_element ); | ||
| 379 | $elems->push({ | ||
| 380 | field => $some_field_name, | ||
| 381 | value => $some_field_value, | ||
| 382 | type => $sql_type, | ||
| 383 | format => $insert_formatting, | ||
| 384 | # Could also be $1, $2, ?1, ?2, or other variants supported by driver | ||
| 385 | placeholder => '?', | ||
| 386 | }); | ||
| 387 | $elems->merge( $other_elements_object ); | ||
| 388 | # Clause class inherits from Elements class | ||
| 389 | $elems->merge( $some_clause_object ); | ||
| 390 | |||
| 391 | =head1 VERSION | ||
| 392 | |||
| 393 | v0.2.0 | ||
| 394 | |||
| 395 | =head1 DESCRIPTION | ||
| 396 | |||
| 397 | This class represent a query manipulation class designed to access, store and retrieve L<query elements|DB::Object::Query::Element> | ||
| 398 | |||
| 399 | Elements are stored in an internal array object accessible with L</elements>, and all the other methods are used to access or manipulate those elements data. | ||
| 400 | |||
| 401 | =head1 CONSTRUCTOR | ||
| 402 | |||
| 403 | =head2 new | ||
| 404 | |||
| 405 | Takes an hash or hash reference of key-value pairs matching any of the methods below. | ||
| 406 | |||
| 407 | Returns a newly instantiated object upon success, or sets an L<error|Module::Generic/error> and return C<undef> or an empty list, depending on the caller's context. | ||
| 408 | |||
| 409 | =head1 METHODS | ||
| 410 | |||
| 411 | =head2 attach | ||
| 412 | |||
| 413 | This takes a query object, and attach it to our current object. | ||
| 414 | |||
| 415 | In turn, it will also attach it to all the elements, this object holds with the L<elements|/elements> method. | ||
| 416 | |||
| 417 | This returns the current object upon success, or upon error, it sets an L<error object|DB::Object::Exception>, and returns C<undef> in scalar context, or an empty list in list context. | ||
| 418 | |||
| 419 | =for Pod::Coverage autoload | ||
| 420 | |||
| 421 | =head2 elements | ||
| 422 | |||
| 423 | Sets or gets an L<array object|Module::Generic::Array> of L<DB::Object::Query::Element> objects. | ||
| 424 | |||
| 425 | =head2 fields | ||
| 426 | |||
| 427 | Read-only. Returns an L<array object|Module::Generic::Array> of all the elements L<field|DB::Object::Query::Element/field> property. | ||
| 428 | |||
| 429 | =head2 for | ||
| 430 | |||
| 431 | This is a shortcut for calling L<Module::Generic::Array/for> on this class L</elements> | ||
| 432 | |||
| 433 | =head2 foreach | ||
| 434 | |||
| 435 | This is a shortcut for calling L<Module::Generic::Array/foreach> on this class L</elements> | ||
| 436 | |||
| 437 | =head2 formats | ||
| 438 | |||
| 439 | Read-only. Returns an L<array object|Module::Generic::Array> of all the elements L<format|DB::Object::Query::Element/format> property. | ||
| 440 | |||
| 441 | =head2 generics | ||
| 442 | |||
| 443 | Read-only. Returns an L<array object|Module::Generic::Array> of all the elements L<generic|DB::Object::Query::Element/generic> representation. | ||
| 444 | |||
| 445 | =head2 is_empty | ||
| 446 | |||
| 447 | This is a shortcut for calling L<Module::Generic::Array/is_empty> on this class L</elements> | ||
| 448 | |||
| 449 | =head2 length | ||
| 450 | |||
| 451 | This is a shortcut for calling L<Module::Generic::Array/length> on this class L</elements> | ||
| 452 | |||
| 453 | =head2 merge | ||
| 454 | |||
| 455 | Provided with one or more L<DB::Object::Query::Elements> objects (including L<DB::Object::Query::Clause> objects that inherit from L<DB::Object::Query::Elements>), and this will merge those objects into this current object. | ||
| 456 | |||
| 457 | If the underlying elements are numbered placeholders such as C<$1>, C<$2>, or C<?1>, C<?2>, then they will be properly sorted internally. | ||
| 458 | |||
| 459 | It returns the current object. | ||
| 460 | |||
| 461 | =head2 new_element | ||
| 462 | |||
| 463 | Provided with an hash or hash reference of parameter, and this will instantiate a new L<DB::Object::Query::Element> object and return it. | ||
| 464 | |||
| 465 | If an error occurred, such as if bad parameters were provided, an L<error object|Module::Generic/error> is set and C<undef>, or an empty list depending on the context, is returned. | ||
| 466 | |||
| 467 | =head2 push | ||
| 468 | |||
| 469 | Provided with objects of classes L<DB::Object::Query::Elements> or L<DB::Object::Query::Element>, or alternatively an hash reference of property-value pairs needed to instantiate a new L<DB::Object::Query::Element>, and this will add those objects to the stack of elements managed by this class. | ||
| 470 | |||
| 471 | If the underlying elements are numbered placeholders such as C<$1>, C<$2>, or C<?1>, C<?2>, then they will be properly sorted internally. | ||
| 472 | |||
| 473 | It returns the current object. | ||
| 474 | |||
| 475 | =head2 query_object | ||
| 476 | |||
| 477 | Sets or gets the L<DB::Object::Query> object set for this object. | ||
| 478 | |||
| 479 | =head2 reset | ||
| 480 | |||
| 481 | Various methods return cached value once they have been computed for improved performance. Calling C<reset> will force re-computing next time either one is called. | ||
| 482 | |||
| 483 | Those methods are L</fields>, L</formats>, L</types> and L</values> | ||
| 484 | |||
| 485 | =head2 sort | ||
| 486 | |||
| 487 | Returns a new clone of the current L<DB::Object::Query::Elements> object with its elements sorted based on their L<index property|DB::Object::Query::Element/index> | ||
| 488 | |||
| 489 | =head2 types | ||
| 490 | |||
| 491 | Read-only. Returns an L<array object|Module::Generic::Array> of all the elements L<type|DB::Object::Query::Element/type> property. | ||
| 492 | |||
| 493 | =head2 values | ||
| 494 | |||
| 495 | Read-only. Returns an L<array object|Module::Generic::Array> of all the elements L<value|DB::Object::Query::Element/value> property. | ||
| 496 | |||
| 497 | =head1 AUTHOR | ||
| 498 | |||
| 499 | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | ||
| 500 | |||
| 501 | =head1 SEE ALSO | ||
| 502 | |||
| 503 | L<DB::Object::Query>, L<DB::Object::Query::Clause>, L<DB::Object::Query::Element>, L<DB::Object> | ||
| 504 | |||
| 505 | =head1 COPYRIGHT & LICENSE | ||
| 506 | |||
| 507 | Copyright(c) 2023 DEGUEST Pte. Ltd. | ||
| 508 | |||
| 509 | All rights reserved. | ||
| 510 | |||
| 511 | This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | ||
| 512 | |||
| 513 | =cut |