Request to register new user
fullname: Gerard RJ Gauthier
userid: GRJG
mail: CENSORED
homepage:
why:
Would like to contribute to perl. I'd like to start by contributing
a simple tuple.
package Tuple;
use warnings; use strict; use Carp;
sub import { my (undef, $name, @funcs) = @_; no strict qw<refs>;
*{"${name}::new"} = sub{ my (undef, @d) = @_; my $d = @funcs; croak
"Data structure must have ${d} elements!" if @funcs != @d; bless
\@d, $name; }; while (my ($i, $f) = each @funcs) {
*{"${name}::get_${f}"} = sub{my ($s) = @_; $s->[$i]};
*{"${name}::set_${f}"} = sub{my ($s, $d) = @_; $s->[$i] = $d}; } }
1;
Usage: #! /usr/bin/env perl
use warnings; use strict; use utf8; use autodie; use feature
qw<say>; use open qw<:encoding(UTF-8)>; use open qw<:std>; use
Data::Dumper; use lib qw<.>; use Tuple qw<Triple left node right>;
my $t = Triple->new(undef, 123, undef);
say Dumper($t);
for my $f (sort keys %Triple::) { say $f; }
$t->set_left(Triple->new(undef, 4143, undef));
say Dumper($t);
exit(0);
The following links are only valid for PAUSE maintainers:
Registration form with editing capabilities:
https://pause.perl.org/pause/authenquery?ACTION=add_user&USERID=50000000_788144876b9110a9&SUBMIT_pause99_add_user_sub=1
Immediate (one click) registration:
https://pause.perl.org/pause/authenquery?ACTION=add_user&USERID=50000000_788144876b9110a9&SUBMIT_pause99_add_user_Definitely=1