HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //snap/gnome-46-2404/current/usr/share/perl5/Set/Scalar/Virtual.pm
package Set::Scalar::Virtual;

use strict;
local $^W = 1;

use vars qw($VERSION @ISA);

$VERSION = '1.29';
@ISA = qw(Set::Scalar::Base);

use Set::Scalar::Base qw(_make_elements as_string _compare _strval);

use overload
    '""'	=> \&as_string,
    'eq'	=> \&are_equal,
    '=='	=> \&are_equal;

sub ELEMENT_SEPARATOR { " " }

sub _extend {
    my $self     = shift;
    my $elements = shift;

    $self->_insert_elements( $elements );
}

sub extend {
    my $self     = shift;

    $self->_extend( { _make_elements( @_ ) } );
}

sub compare {
    my $a = shift;
    my $b = shift;

    if (ref $a && ref $b && $a->isa(__PACKAGE__) && $b->isa(__PACKAGE__)) {
	$a = _strval($a);
	$b = _strval($b);
    }

    return _compare($a, $b);
}

sub are_equal {
    my $a = shift;
    my $b = shift;

    return $a->compare($b) eq 'equal';
}

sub clone {
    my $self     = shift;

    return $self;
}

=pod

=head1 NAME

Set::Scalar::Virtual - internal class for Set::Scalar

=head1 SYNOPSIS

B<Internal use only>.

=head1 DESCRIPTION

B<This is not the module you are looking for.>
See the L<Set::Scalar>.

=head1 AUTHOR

Jarkko Hietaniemi <jhi@iki.fi>

=cut

1;