NAME

Simple::Tuple - Because tuples should be simple and simple to use!

VERSION

Version 0.01

SYNOPSIS

Tuples should simple to use and create so I created a simple tuple generator.

To create a tuple just use Simple::Tuple and include a list of the name of the tuple and elements of the tuple. The Simple::Tuple will automatically create a class and getters and setters for the elements. example: use Simple::Tuple qw<Pair first second>;

will create a class called Pair with getters get_first, get_second and setters set_first, set_second.

code snippet demostrating Simple::Tuple.

#! /usr/bin/env perl

use warnings;
use strict;
use utf8;
use feature qw<say>;
use Data::Dumper;
use Simple::Tuple qw<Pair first second>;
use Simple::Tuple qw<Node left data right>;

my $p = Pair->new(1, 2,);
my $n = Node->new(4, 5, 6,);

say Dumper($p);
say Dumper($n);

say $p->get_first;
say $p->get_second;

say $n->get_left;
say $n->get_data;
say $n->get_right;

$p->set_first(11);
$p->set_second(12);

$n->set_left(14);
$n->set_data(15);
$n->set_right(16);

say $p->get_first;
say $p->get_second;

say $n->get_left;
say $n->get_data;
say $n->get_right;

exit 0;
   

EXPORT

No functions are exported.

SUBROUTINES/METHODS

import

AUTHOR

Gerard Gauthier, <gerard4143 at hotmail.com>

BUGS

Please report any bugs or feature requests to bug-simple-tuple at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Simple-Tuple. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Simple::Tuple

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2025 by Gerard Gauthier.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)