File: RefElem.pm

package info (click to toggle)
libarray-refelem-perl 1.00+ds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 76 kB
  • ctags: 2
  • sloc: perl: 10; makefile: 3
file content (67 lines) | stat: -rw-r--r-- 1,308 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package Array::RefElem;

use strict;
use vars qw(@ISA @EXPORT_OK $VERSION);

require Exporter;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
@EXPORT_OK = qw(av_store av_push hv_store);

$VERSION = '1.00';

Array::RefElem->bootstrap($VERSION);

1;

__END__

=head1 NAME

Array::RefElem - Set up array elements as aliases

=head1 SYNOPSIS

 use Array::RefElem qw(av_store av_push hv_store);

 av_store(@a, 1, $a);
 av_push(@a, $a);
 hv_store(%h, $key, $a);

=head1 DESCRIPTION

This module gives direct access to some of the internal Perl routines
that let you store things in arrays and hashes.  The following
functions are available:

=over

=item av_store(@array, $index, $value)

Stores $value in @array at the specified $index.  After executing this call,
$array[$index] and $value denote the same thing.

=item av_push(@array, $value)

Pushes $value onto the @array.  After executing this call, $array[-1] and $value
denote the same thing.

=item hv_store(%hash, $key, $value);

Stores $value in the %hash with the given $key. After executing this call,
$hash{$key} and $value denote the same thing.

=back

=head1 SEE ALSO

L<perlguts>

=head1 COPYRIGHT

Copyright 2000 Gisle Aas.

This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

=cut