Tie-Cycle-1.226/ 000755 000765 000024 00000000000 13777267044 013561 5 ustar 00brian staff 000000 000000 Tie-Cycle-1.226/LICENSE 000644 000765 000024 00000017334 13777267042 014574 0 ustar 00brian staff 000000 000000 The Tie::Cycle module is licensed under the Artistic License 2.0.
Artistic License 2.0
Copyright (c) 2000-2006, The Perl Foundation.
http://www.perlfoundation.org/artistic_license_2_0
Preamble
This license establishes the terms under which a given free software
Package may be copied, modified, distributed, and/or redistributed.
The intent is that the Copyright Holder maintains some artistic
control over the development of that Package while still keeping the
Package available as open source and free software.
You are always permitted to make arrangements wholly outside of this
license directly with the Copyright Holder of a given Package. If the
terms of this license do not permit the full use that you propose to
make of the Package, you should contact the Copyright Holder and seek
a different licensing arrangement.
Definitions
"Copyright Holder" means the individual(s) or organization(s) named in
the copyright notice for the entire Package.
"Contributor" means any party that has contributed code or other
material to the Package, in accordance with the Copyright Holder's
procedures.
"You" and "your" means any person who would like to copy, distribute,
or modify the Package.
"Package" means the collection of files distributed by the Copyright
Holder, and derivatives of that collection and/or of those files. A
given Package may consist of either the Standard Version, or a
Modified Version.
"Distribute" means providing a copy of the Package or making it
accessible to anyone else, or in the case of a company or
organization, to others outside of your company or organization.
"Distributor Fee" means any fee that you charge for Distributing this
Package or providing support for this Package to another party. It
does not mean licensing fees.
"Standard Version" refers to the Package if it has not been modified,
or has been modified only in ways explicitly requested by the
Copyright Holder.
"Modified Version" means the Package, if it has been changed, and such
changes were not explicitly requested by the Copyright Holder.
"Original License" means this Artistic License as Distributed with the
Standard Version of the Package, in its current version or as it may
be modified by The Perl Foundation in the future.
"Source" form means the source code, documentation source, and
configuration files for the Package.
"Compiled" form means the compiled bytecode, object code, binary, or
any other form resulting from mechanical transformation or translation
of the Source form.
Permission for Use and Modification Without Distribution
(1) You are permitted to use the Standard Version and create and use
Modified Versions for any purpose without restriction, provided that
you do not Distribute the Modified Version.
Permissions for Redistribution of the Standard Version
(2) You may Distribute verbatim copies of the Source form of the
Standard Version of this Package in any medium without restriction,
either gratis or for a Distributor Fee, provided that you duplicate
all of the original copyright notices and associated disclaimers. At
your discretion, such verbatim copies may or may not include a
Compiled form of the Package.
(3) You may apply any bug fixes, portability changes, and other
modifications made available from the Copyright Holder. The resulting
Package will still be considered the Standard Version, and as such
will be subject to the Original License.
Distribution of Modified Versions of the Package as Source
(4) You may Distribute your Modified Version as Source (either gratis
or for a Distributor Fee, and with or without a Compiled form of the
Modified Version) provided that you clearly document how it differs
from the Standard Version, including, but not limited to, documenting
any non-standard features, executables, or modules, and provided that
you do at least ONE of the following:
(a) make the Modified Version available to the Copyright Holder of the
Standard Version, under the Original License, so that the Copyright
Holder may include your modifications in the Standard Version.
(b) ensure that installation of your Modified Version does not prevent
the user installing or running the Standard Version. In addition, the
Modified Version must bear a name that is different from the name of
the Standard Version.
(c) allow anyone who receives a copy of the Modified Version to make
the Source form of the Modified Version available to others under
(i) the Original License or
(ii) a license that permits the licensee to freely copy, modify and
redistribute the Modified Version using the same licensing terms that
apply to the copy that the licensee received, and requires that the
Source form of the Modified Version, and of any works derived from it,
be made freely available in that license fees are prohibited but
Distributor Fees are allowed.
Distribution of Compiled Forms of the Standard Version or Modified
Versions without the Source
(5) You may Distribute Compiled forms of the Standard Version without
the Source, provided that you include complete instructions on how to
get the Source of the Standard Version. Such instructions must be
valid at the time of your distribution. If these instructions, at any
time while you are carrying out such distribution, become invalid, you
must provide new instructions on demand or cease further distribution.
If you provide valid instructions or cease distribution within thirty
days after you become aware that the instructions are invalid, then
you do not forfeit any of your rights under this license.
(6) You may Distribute a Modified Version in Compiled form without the
Source, provided that you comply with Section 4 with respect to the
Source of the Modified Version.
Aggregating or Linking the Package
(7) You may aggregate the Package (either the Standard Version or
Modified Version) with other packages and Distribute the resulting
aggregation provided that you do not charge a licensing fee for the
Package. Distributor Fees are permitted, and licensing fees for other
components in the aggregation are permitted. The terms of this license
apply to the use and Distribution of the Standard or Modified Versions
as included in the aggregation.
(8) You are permitted to link Modified and Standard Versions with
other works, to embed the Package in a larger work of your own, or to
build stand-alone binary or bytecode versions of applications that
include the Package, and Distribute the result without restriction,
provided the result does not expose a direct interface to the Package.
Items That are Not Considered Part of a Modified Version
(9) Works (including, but not limited to, modules and scripts) that
merely extend or make use of the Package, do not, by themselves, cause
the Package to be a Modified Version. In addition, such works are not
considered parts of the Package itself, and are not subject to the
terms of this license.
General Provisions
(10) Any use, modification, and distribution of the Standard or
Modified Versions is governed by this Artistic License. By using,
modifying or distributing the Package, you accept this license. Do not
use, modify, or distribute the Package, if you do not accept this
license.
(11) If your Modified Version has been derived from a Modified Version
made by someone other than you, you are nevertheless required to
ensure that your Modified Version complies with the requirements of
this license.
(12) This license does not grant you the right to use any trademark,
service mark, tradename, or logo of the Copyright Holder.
(13) This license includes the non-exclusive, worldwide,
free-of-charge patent license to make, have made, use, offer to sell,
sell, import and otherwise transfer the Package with respect to any
patent claims licensable by the Copyright Holder that are necessarily
infringed by the Package. If you institute patent litigation
Tie-Cycle-1.226/Changes 000644 000765 000024 00000005054 13777267042 015056 0 ustar 00brian staff 000000 000000 Revision history for Perl module Tie::Cycle
1.226 2021-01-12T09:38:15Z
* Freshening the distro, Travis is gone, Github Actions are in.
1.225 2017-07-09T17:49:10Z
* Bump the version to reindex (See https://github.com/andk/pause/issues/248 )
1.224 2017-04-18T11:41:22Z
* Fix up various dist things and clarify that this is under
the Artistic License 2.0.
1.222 2017-01-20T11:30:37Z
* The module seems to have disappeared from CPAN, so I'm
re-uploading.
1.221 2016-02-02T21:17:53Z
* Freshen distro
1.21 - 2014-10-03
* Update Makefile for better META data
1.20 - 2014-08-16
* Bump to user version
1.19_01 - 2013-09-02
* Take out // (5.10 feature I used without thought) to restore
5.8 compatibility.
1.19 - 2013-08-27
* Update for modern usage, better code
* I use this as an example in Mastering Perl, so I shouldn't
leave embarrassing practices in the code. :)
1.17 - 2009-01-30
* Updated the docs for the move to Github
* There aren't any code changes
1.16 - 2007-10-27
* distro cleanups after moving from CVS to SVN
1.15 - 2007-03-18
* Cleaning dist for new SVN repository
* No need to upgrade
1.14 - 2007-01-09
* updated copyright and license info
* no code changes, so no need to upgrade
1.13 - 2006-05-17
* Minor cleanups in docs, copyright, and pod testing. No need to
upgrade.
1.12 - 2005-03-08
* Added POD coverage tests. No need to upgrade
1.11 - 2005-01-03
* Previously, this module refused to work unless the input array had
more than one element. What's the point of cycling otherwise? I've
removed that restriction, though, because I shouldn't be the one who
gets to decide that. A one element array should get a chance to act
like any other array. It just happens to have one element.
1.09 - 2004-09-02
* Just some distribution fixes. No need to upgrade.
1.07 - 2004-01-31
* No code changes.
* Removed dependencies on Test::Manifest, Test::Pod and
File::Find::Rule.
* Fixed some warnings in tests.
1.06 - 2002-12-17
* cycle.t test was actually one from Tie::Toggle. it is not
the right test.
1.05 - 2002-12-17
* removed 'require 5.6.0' (perl5.8 complains about v-strings)
* beefed up distribution files
* no code changes --- no need to install if you already have this
0.05 - 2002-08-14
* added reset() method for underlying object so Andy
Lester can do HTML table tricks
* since I was there, I added previous() and next()
methods so you can peek at values without affecting
the position.
0.02 - 2001-01-24
* minor doc fixes
0.01 - 2000-08-12
* original version; created by h2xs 1.20 with options -AXn Tie::Cycle
Tie-Cycle-1.226/MANIFEST 000644 000765 000024 00000000612 13777267044 014711 0 ustar 00brian staff 000000 000000 Changes
CONTRIBUTING.md
examples/README
INSTALL.SKIP
lib/Tie/Cycle.pm
LICENSE
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
README.pod
t/cycle.t
t/load.t
t/one.t
t/pod.t
t/pod_coverage.t
t/test_manifest
xt/changes.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
Tie-Cycle-1.226/t/ 000755 000765 000024 00000000000 13777267043 014023 5 ustar 00brian staff 000000 000000 Tie-Cycle-1.226/xt/ 000755 000765 000024 00000000000 13777267043 014213 5 ustar 00brian staff 000000 000000 Tie-Cycle-1.226/README.pod 000644 000765 000024 00000007561 13777267042 015231 0 ustar 00brian staff 000000 000000 =pod
=encoding utf8
=for HTML
=for HTML
=for HTML
=for HTML
=for HTML
=for HTML
=for HTML
=head1 The Tie::Cycle module
This is the I for the L Perl module. It allows
you to create an array that continually cycles through its elements
no matter what index you use. It's mostly a demonstration of the
C mechanism.
You're probably looking at this because you don't know where else to
find what you're looking for. Read this once and you might never have
to read one again for any Perl module.
=head2 Documentation
To read about L, look at the embedded documentation
in the module itself. Inside the distribution, you can format it
with L:
% perldoc lib/Tie/Cycle.pm
If you have already installed the module, you can specify the module
name instead of the file location:
% perldoc Tie::Cycle
You can read the documentation and inspect the meta data at
L.
The standard module documentation has example uses in the SYNOPSIS
section, but you can also look in the I directory (if it's
there), or look at the test files in I.
=head2 Installation
You can install this module with a CPAN client, which will resolve
and install the dependencies:
% cpan Tie::Cycle
% cpanm Tie::Cycle
You can also install directly from the distribution directory, which
will also install the dependencies:
% cpan .
% cpanm .
You could install just this module manually:
% perl Makefile.PL
% make
% make test
% make install
You probably don't want to do that unless you're fiddling with the
module and only want to run the tests without installing anything.
=head2 Source location
The meta data, such as the source repository and bug tracker, is in
I or the I files it creates. You can find that on
those CPAN web interfaces, but you can also look at files directly in
the source repository:
=over 4
=item * L
=back
If you find a problem, file a ticket in the L:
=over 4
=item * L
=back
=head2 Getting help
Although I'm happy to hear from module users in private email,
that's the best way for me to forget to do something.
Besides the issue trackers, you can find help at
L or
L, both of which have many
competent Perlers who can answer your question, almost in real time.
They might not know the particulars of this module, but they can help
you diagnose your problem.
You might like to read L.
=head2 Copyright and License
You should have received a I file, but the license is also noted
in the module files. About the only thing you can't do is pretend that
you wrote code that you didn't.
=head2 Good luck!
Enjoy,
brian d foy, bdfoy@cpan.org
=cut
Tie-Cycle-1.226/MANIFEST.SKIP 000644 000765 000024 00000002106 13777267042 015454 0 ustar 00brian staff 000000 000000
#!start included /usr/local/perls/perl-5.14.2/lib/5.14.2/ExtUtils/MANIFEST.SKIP
# Avoid version control files.
\bRCS\b
\bCVS\b
\bSCCS\b
,v$
\B\.svn\b
\B\.git\b
\B\.gitignore\b
\b_darcs\b
\B\.cvsignore$
# Avoid VMS specific MakeMaker generated files
\bDescrip.MMS$
\bDESCRIP.MMS$
\bdescrip.mms$
# Avoid Makemaker generated and utility files.
\bMANIFEST\.bak
\bMakefile$
\bblib/
\bMakeMaker-\d
\bpm_to_blib\.ts$
\bpm_to_blib$
\bblibdirs\.ts$ # 6.18 through 6.25 generated this
# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
\bBuild.bat$
\bBuild.COM$
\bBUILD.COM$
\bbuild.com$
# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
\.tmp$
\.#
\.rej$
# Avoid OS-specific files/dirs
# Mac OSX metadata
\B\.DS_Store
# Mac OSX SMB mount metadata files
\B\._
# Avoid Devel::Cover and Devel::CoverX::Covered files.
\bcover_db\b
\bcovered\b
# Avoid MYMETA files
^MYMETA\.
#!end included /usr/local/perls/perl-5.14.2/lib/5.14.2/ExtUtils/MANIFEST.SKIP
MANIFEST\s\d
Changes\s\d
\.travis\.yml
\.?appveyor.yml
\.releaserc
\.lwpcookies
\.gitignore
\.github\b
Tie-\.*
Tie-Cycle-1.226/CONTRIBUTING.md 000644 000765 000024 00000004476 13777267042 016023 0 ustar 00brian staff 000000 000000 # Contributing to Tie::Cycle
## Pull requests
Good pull requests - patches, improvements, new features - are a fantastic
help. They should remain focused in scope and avoid containing unrelated
commits.
**Please ask first** before embarking on any significant pull request (e.g.
implementing features, refactoring code, porting to a different language),
otherwise you risk spending a lot of time working on something that the
project's developers might not want to merge into the project.
Please adhere to the coding conventions used throughout a project (indentation,
accurate comments, etc.) and any other requirements (such as test coverage).
Follow this process if you'd like your work considered for inclusion in the
project:
1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork,
and configure the remotes:
```bash
# Clone your fork of the repo into the current directory
git clone https://github.com//
# Navigate to the newly cloned directory
cd
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com//
```
2. If you cloned a while ago, get the latest changes from upstream:
```bash
git checkout
git pull upstream
```
3. Create a new topic branch (off the main project development branch) to
contain your feature, change, or fix:
```bash
git checkout -b
```
4. Commit your changes in logical chunks. Please make you git commit message detailed and specific
or your code is unlikely be merged into the main project. Use Git's
[interactive rebase](https://help.github.com/articles/interactive-rebase)
feature to tidy up your commits before making them public.
5. Locally merge (or rebase) the upstream development branch into your topic branch:
```bash
git pull [--rebase] upstream
```
6. Push your topic branch up to your fork:
```bash
git push origin
```
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
with a clear title and description.
**IMPORTANT**: By submitting a patch, you agree to allow the project owner to
license your work under the same license as that used by the project.
Tie-Cycle-1.226/examples/ 000755 000765 000024 00000000000 13777267043 015376 5 ustar 00brian staff 000000 000000 Tie-Cycle-1.226/META.yml 000664 000765 000024 00000001420 13777267044 015031 0 ustar 00brian staff 000000 000000 ---
abstract: 'Cycle through a list of values via a scalar.'
author:
- 'brian d foy '
build_requires:
Test::More: '1'
configure_requires:
ExtUtils::MakeMaker: '6.64'
File::Spec::Functions: '0'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010'
license: artistic_2
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Tie-Cycle
no_index:
directory:
- t
- inc
requires:
Carp: '0'
perl: '5.008'
resources:
bugtracker: https://github.com/briandfoy/tie-cycle/issues
homepage: https://github.com/briandfoy/tie-cycle
repository: https://github.com/briandfoy/tie-cycle.git
version: '1.226'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
Tie-Cycle-1.226/lib/ 000755 000765 000024 00000000000 13777267043 014326 5 ustar 00brian staff 000000 000000 Tie-Cycle-1.226/Makefile.PL 000644 000765 000024 00000005007 13777267042 015533 0 ustar 00brian staff 000000 000000 package Tie::Cycle;
use strict;
use warnings;
=encoding utf8
=head1 The build file for Tie::Cycle
This build file is a modulino; it works as both a build script and
a module.
To build the distribution, run this file normally:
% perl Makefile.PL
But, it's more interesting than that. You can load it with C
and call C to get the data structure it passes to
C:
my $package = require '/path/to/Makefile.PL';
my $arguments = $package->arguments;
Note that C-ing a file makes an entry in C<%INC> for exactly
that name. If you try to C another file with the same name,
even from a different path, C thinks it has already loaded
the file. As such, I recommend you always require the full path to the
file.
The return value of the C is a package name (in this case,
the name of the main module. Use that to call the C method.
Even if this distribution needs a higher version of Perl, this bit
only needs v5.8. You can play with the data structure with a primitive
Perl.
=cut
use File::Spec::Functions qw(catfile);
my $module = __PACKAGE__;
( my $dist = $module ) =~ s/::/-/g;
my $github = 'https://github.com/briandfoy/tie-cycle';
my $main_file = catfile( 'lib', split /::/, "$module.pm" );
my %WriteMakefile = (
'MIN_PERL_VERSION' => '5.008',
'NAME' => $module,
'ABSTRACT_FROM' => $main_file,
'VERSION_FROM' => $main_file,
'LICENSE' => 'artistic_2',
'AUTHOR' => 'brian d foy ',
'CONFIGURE_REQUIRES' => {
'ExtUtils::MakeMaker' => '6.64',
'File::Spec::Functions' => '0',
},
'BUILD_REQUIRES' => {
},
'TEST_REQUIRES' => {
'Test::More' => '1',
},
'PREREQ_PM' => {
'Carp' => '0',
},
'META_MERGE' => {
'meta-spec' => { version => 2 },
resources => {
repository => {
type => 'git',
url => "$github.git",
web => $github,
},
bugtracker => {
web => "$github/issues",
},
homepage => $github,
},
},
'clean' => { FILES => "$dist-*" },
);
sub arguments { \%WriteMakefile }
do_it() unless caller;
sub do_it {
my $MM ='ExtUtils::MakeMaker';
my $MM_version =
eval{ "$MM " . $WriteMakefile{'CONFIGURE_REQUIRES'}{'ExtUtils::MakeMaker'} }
||
"$MM 6.64";
eval "use $MM_version; 1" or die "Could not load $MM_version: $@";
eval "use Test::Manifest 1.21";
my $arguments = arguments();
my $minimum_perl = $arguments->{MIN_PERL_VERSION} || '5.008';
eval "require $minimum_perl;" or die $@;
WriteMakefile( %$arguments );
}
no warnings;
__PACKAGE__;
Tie-Cycle-1.226/INSTALL.SKIP 000644 000765 000024 00000000156 13777267042 015357 0 ustar 00brian staff 000000 000000 README\.pod
README.*
# things that might be in local directories after fooling
# around with them
\.DS_Store
Tie-Cycle-1.226/META.json 000664 000765 000024 00000002610 13777267044 015203 0 ustar 00brian staff 000000 000000 {
"abstract" : "Cycle through a list of values via a scalar.",
"author" : [
"brian d foy "
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 2.150010",
"license" : [
"artistic_2"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : 2
},
"name" : "Tie-Cycle",
"no_index" : {
"directory" : [
"t",
"inc"
]
},
"prereqs" : {
"build" : {
"requires" : {}
},
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "6.64",
"File::Spec::Functions" : "0"
}
},
"runtime" : {
"requires" : {
"Carp" : "0",
"perl" : "5.008"
}
},
"test" : {
"requires" : {
"Test::More" : "1"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/briandfoy/tie-cycle/issues"
},
"homepage" : "https://github.com/briandfoy/tie-cycle",
"repository" : {
"type" : "git",
"url" : "https://github.com/briandfoy/tie-cycle.git",
"web" : "https://github.com/briandfoy/tie-cycle"
}
},
"version" : "1.226",
"x_serialization_backend" : "JSON::PP version 4.02"
}
Tie-Cycle-1.226/lib/Tie/ 000755 000765 000024 00000000000 13777267043 015047 5 ustar 00brian staff 000000 000000 Tie-Cycle-1.226/lib/Tie/Cycle.pm 000644 000765 000024 00000006411 13777267042 016445 0 ustar 00brian staff 000000 000000 package Tie::Cycle;
use strict;
our $VERSION = '1.226';
use Carp qw(carp);
use constant CURSOR_COL => 0;
use constant COUNT_COL => 1;
use constant ITEM_COL => 2;
sub TIESCALAR {
my( $class, $list_ref ) = @_;
my $self = bless [], $class;
unless( $self->STORE( $list_ref ) ) {
carp "The argument to Tie::Cycle must be an array reference";
return;
}
return $self;
}
sub FETCH {
my( $self ) = @_;
my $index = $self->[CURSOR_COL]++;
$self->[CURSOR_COL] %= $self->_count;
return $self->_item( $index );
}
sub STORE {
my( $self, $list_ref ) = @_;
return unless ref $list_ref eq ref [];
my @shallow_copy = map { $_ } @$list_ref;
$self->[CURSOR_COL] = 0;
$self->[COUNT_COL] = scalar @shallow_copy;
$self->[ITEM_COL] = \@shallow_copy;
}
sub reset { $_[0]->[CURSOR_COL] = 0 }
sub previous {
my( $self ) = @_;
my $index = $self->_cursor - 1;
$self->[CURSOR_COL] %= $self->_count;
return $self->_item( $index );
}
sub next {
my( $self ) = @_;
my $index = $self->_cursor + 1;
$self->[CURSOR_COL] %= $self->_count;
return $self->_item( $index );
}
sub _cursor { $_[0]->[CURSOR_COL] }
sub _count { $_[0]->[COUNT_COL] }
sub _item {
my( $self, $index ) = @_;
$index = defined $index ? $index : $self->_cursor;
$self->[ITEM_COL][ $index ]
}
"Tie::Cycle";
__END__
=encoding utf8
=head1 NAME
Tie::Cycle - Cycle through a list of values via a scalar.
=head1 SYNOPSIS
use v5.10;
use Tie::Cycle;
tie my $cycle, 'Tie::Cycle', [ qw( FFFFFF 000000 FFFF00 ) ];
say $cycle; # FFFFFF
say $cycle; # 000000
say $cycle; # FFFF00
say $cycle; # FFFFFF back to the beginning
(tied $cycle)->reset; # back to the beginning
=head1 DESCRIPTION
You use C to go through a list over and over again.
Once you get to the end of the list, you go back to the beginning.
You don't have to worry about any of this since the magic of
tie does that for you.
The tie takes an array reference as its third argument. The tie
should succeed unless the argument is not an array reference.
Previous versions required you to use an array that had more
than one element (what's the pointing of looping otherwise?),
but I've removed that restriction since the number of elements
you want to use may change depending on the situation.
During the tie, this module makes a shallow copy of the array
reference. If the array reference contains references, and those
references are changed after the tie, the elements of the cycle
will change as well. See the included F script for an
example of this effect.
=head1 OBJECT METHODS
You can call methods on the underlying object (which you access
with C ).
=over 4
=item reset
Roll the iterator back to the starting position. The next access
will give the first element in the list.
=item previous
Give the previous element. This does not affect the current position.
=item next
Give the next element. This does not affect the current position.
You can peek at the next element if you like.
=back
=head1 SOURCE AVAILABILITY
This module is on Github:
https://github.com/briandfoy/tie-cycle
=head1 AUTHOR
brian d foy, C<< >>
=head1 COPYRIGHT AND LICENSE
Copyright © 2000-2021, brian d foy C<< >>. All rights reserved.
This software is available under the Artistic License 2.0.
=cut
Tie-Cycle-1.226/examples/README 000644 000765 000024 00000000105 13777267042 016251 0 ustar 00brian staff 000000 000000 See the tests in the t/ directory for examples until I add some more. Tie-Cycle-1.226/xt/changes.t 000644 000765 000024 00000000203 13777267042 016002 0 ustar 00brian staff 000000 000000 use Test::More;
eval 'use Test::CPAN::Changes';
plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
changes_ok();
Tie-Cycle-1.226/t/pod.t 000644 000765 000024 00000000206 13777267042 014767 0 ustar 00brian staff 000000 000000 use Test::More 0.95;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
all_pod_files_ok();
Tie-Cycle-1.226/t/one.t 000644 000765 000024 00000000465 13777267042 014775 0 ustar 00brian staff 000000 000000 use Test::More 0.95;
use Tie::Cycle;
my @array = qw( A );
tie my $cycle, 'Tie::Cycle', \@array;
is( $cycle, $array[0], "Cycle is first element, iteration 1" );
is( $cycle, $array[0], "Cycle is first element, iteration 2" );
is( $cycle, $array[0], "Cycle is first element, iteration 3" );
done_testing();
Tie-Cycle-1.226/t/load.t 000644 000765 000024 00000000114 13777267042 015122 0 ustar 00brian staff 000000 000000 use Test::More 0.95;
use_ok( 'Tie::Cycle' ) or BAILOUT();
done_testing();
Tie-Cycle-1.226/t/cycle.t 000644 000765 000024 00000000522 13777267042 015305 0 ustar 00brian staff 000000 000000 use Test::More;
use Tie::Cycle;
my @array = qw( A B C );
tie my $cycle, 'Tie::Cycle', \@array;
foreach( 0 .. 2 ) {
is( $cycle, $array[0], "Cycle is first element, iteration $_" );
is( $cycle, $array[1], "Cycle is second element, iteration $_" );
is( $cycle, $array[2], "Cycle is third element, iteration $_" );
}
done_testing();
Tie-Cycle-1.226/t/test_manifest 000644 000765 000024 00000000052 13777267042 016607 0 ustar 00brian staff 000000 000000 load.t
pod.t
pod_coverage.t
cycle.t
one.t
Tie-Cycle-1.226/t/pod_coverage.t 000644 000765 000024 00000000357 13777267042 016651 0 ustar 00brian staff 000000 000000 use Test::More 0.95;
eval "use Test::Pod::Coverage";
if( $@ ) {
plan skip_all => "Test::Pod::Coverage required for testing POD";
}
else {
pod_coverage_ok( "Tie::Cycle",
{ trustme => [ qr/^[A-Z_]+$/ ] }
);
}
done_testing();