Beta Shell
v2.0 ยท web2.us.cloudlogin.co
[FM]
[CMD]
[PHP]
[DB]
[INFO]
[SEC]
File Manager
~
/
usr
/
share
/
doc
/
perl-Devel-Cycle
Upload
4 items
Name
Size
Perms
Modified
Actions
[ .. / .. ]
Changes
1.46 KB
-rw-r--r--
2014-11-14 13:56:40
Edit
Del
README
1.67 KB
-rw-r--r--
2014-11-14 13:55:57
Edit
Del
Editing: README
(1.67 KB)
Path: /usr/share/doc/perl-Devel-Cycle/README
Back
Perl Module Devel::Cycle ======================== This module can be used to find memory cycles in objects and other references. Here is the synopsis: #!/usr/bin/perl use Devel::Cycle; # create an object that has four cycles my $test = {fred => [qw(a b c d e)], ethel => [qw(1 2 3 4 5)], george => {martha => 23, agnes => 19} }; # cycle 1 $test->{george}{phyllis} = $test; # cycle 2 $test->{fred}[3] = $test->{george}; # cycles 3 and 4 $test->{george}{mary} = $test->{fred}; find_cycle($test); exit 0; # output of the script: Cycle (1): HASH(0x8171d30)->{george} => HASH(0x8171d00) HASH(0x8171d00)->{phyllis} => HASH(0x8171d30) Cycle (2): HASH(0x8171d30)->{george} => HASH(0x8171d00) HASH(0x8171d00)->{mary} => ARRAY(0x814be60) ARRAY(0x814be60)->[3] => HASH(0x8171d00) Cycle (3): HASH(0x8171d30)->{fred} => ARRAY(0x814be60) ARRAY(0x814be60)->[3] => HASH(0x8171d00) HASH(0x8171d00)->{phyllis} => HASH(0x8171d30) Cycle (4): HASH(0x8171d30)->{fred} => ARRAY(0x814be60) ARRAY(0x814be60)->[3] => HASH(0x8171d00) HASH(0x8171d00)->{mary} => ARRAY(0x814be60) INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEVELOPING The master repository for Devel::Cycle is kept on GitHub at https://github.com/lstein/Devel-Cycle. Please contribute by sending pull requests. COPYRIGHT AND LICENCE Copyright (C) 2003-2014 by Lincoln Stein <lincoln.stein@gmail.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.