Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/self/root/usr/share/perl5/vendor_perl/Validation/Class/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/share/perl5/vendor_perl/Validation/Class/Errors.pm
# Error Handling Object for Fields and Classes

# Validation::Class::Errors is responsible for error handling in
# Validation::Class derived classes on both the class and field levels
# respectively and is derived from the L<Validation::Class::Listing> class.

package Validation::Class::Errors;

use strict;
use warnings;

use Validation::Class::Util '!has', '!hold';

our $VERSION = '7.900057'; # VERSION

use base 'Validation::Class::Listing';

sub add {

    my $self = shift;

    my $arguments = isa_arrayref($_[0]) ? $_[0] : [@_];

    push @{$self}, @{$arguments};

    @{$self} = ($self->unique);

    return $self;

}

sub to_string {

    my ($self, $delimiter, $transformer) = @_;

    $delimiter = ', ' unless defined $delimiter; # default is a comma-space

    $self->each($transformer) if $transformer;

    return $self->join($delimiter);

}

1;

Hry