class::makemethods::utility::ref(3pm) [debian man page]
MakeMethods::Utility::Ref(3pm) User Contributed Perl Documentation MakeMethods::Utility::Ref(3pm)NAME
Class::MakeMethods::Utility::Ref - Deep copying and comparison
SYNOPSIS
use Class::MakeMethods::Utility::Ref qw( ref_clone ref_compare );
$deep_copy = ref_clone( $original );
$positive_zero_or_negative = ref_compare( $item_a, $item_b );
DESCRIPTION
This module provides utility functions to copy and compare arbitrary references, including full traversal of nested data structures.
REFERENCE
The following functions are provided:
ref_clone()
Make a recursive copy of a reference.
ref_compare()
Attempt to recursively compare two references.
If they are not the same, try to be consistent about returning a positive or negative number so that it can be used for sorting. The sort
order is kinda arbitrary.
SEE ALSO
See Class::MakeMethods for general information about this distribution.
See Ref for the original version of the clone and compare functions used above.
See Clone (v0.09 on CPAN as of 2000-09-21) for a clone method with an XS implementation.
The Perl6 RFP #67 proposes including clone functionality in the core.
See Data::Compare (v0.01 on CPAN as of 1999-04-24) for a Compare method which checks two references for similarity, but it does not provide
positive/negative values for ordering purposes.
perl v5.10.1 2004-09-06 MakeMethods::Utility::Ref(3pm)
Check Out this Related Man Page
MakeMethods::Emulator::mcoder(3pm) User Contributed Perl Documentation MakeMethods::Emulator::mcoder(3pm)NAME
Class::MakeMethods::Emulator::mcoder - Emulate the mcoder module
SYNOPSIS
package MyClass;
use Class::MakeMethods::Emulator::mcoder
[qw(get set)] => [qw(color sound height)],
proxy => [qw(runner run walk stop)],
calculated => weight;
sub _calculate_weight { shift->ask_weight }
DESCRIPTION
This module emulates the functionality of the mcoder module, using Class::MakeMethods to generate similar methods.
For example, the following lines are equivalent:
use mcoder 'get' => 'foo';
use mcoder::get 'foo';
use Class::MakeMethods::Template::Hash 'scalar --get' => 'foo';
You may use this module directly, as shown in the SYNOPSIS above, or you may call "use Class::MakeMethods::Emulator::mcoder
'-take_namespace';" to alias the mcoder namespace to this package, and subsequent calls to the original package will be transparently
handled by this emulator. To remove the emulation aliasing, call "use Class::MakeMethods::Emulator::mcoder '-release_namespace'". The same
mechanism is also available for the "sugar" subclasses.
Caution: This affects all subsequent uses of the mcoder module in your program, including those in other modules, and might cause
unexpected effects.
SEE ALSO
See Class::MakeMethods for general information about this distribution.
See Class::MakeMethods::Emulator for more about this family of subclasses.
See " mcoder" for documentation of the original module.
perl v5.10.1 2004-09-06 MakeMethods::Emulator::mcoder(3pm)
Hi all,
I need to perform a physical copy of a DIGITAL(HP) Server machine:
is it possibe to do this in order to have an exact copy ( a clone to intend of)to another machine: including also the configuration files and the network configuration of the previous machine?.
Someone said me I can use... (2 Replies)
Hi ,
I am required to view the fixed postion file very often . I am looking for the utility like this
if the file has a one or multile line
abcdefghijklmnopqr
Utility should make my file look like this
12345678910111213141516--------------------------
abcdefghijk l m n o p q r ... (4 Replies)
Hi everybody,
I have a file that looks like:
A B C D -1 0
E F G H -2 0
I J K L +1
M N O P -6
I would like to compare $5 of every line. If both values are negative, I calculate a mean value and write the first line and delete the second one. If the two $5 values are different only... (6 Replies)
I am creating a script to compare definitions and declarations of functions in C code, and report if the arguments are different.
So I need to compare the 2 strings (args of both), how can I do that? (2 Replies)
Hi Folks,
I have a file with 22 columns. In which, I need to remove nulls if found at $2, $4, $14 & $16. Then, needs to compare the fields such as $2 == $14 && $4 == $16. The final output will print all the fields where the above conditions are satisfied.
Could you please anyone help me... (6 Replies)
Hi,
I need the most efficient way of comparing the following and arriving at the result
I have a file which has entries like,
File1:
1|2|5|7|8|2|3|6|3|1
File2:
1|2|3|1|2|7|9|2
I need to compare the entries in these two file with those of a general file,
1|2|3|5|2|5|6|9|3|1... (7 Replies)
Hi all
I have to compare two files and find out common entries and write the data before it
I have to compare these two files:
One file with 3 columns
second file with two columns
I have to compare column 1 of second file and colmn 3 of first file and
then if there is... (2 Replies)
Hi,
I am trying to compare two lists that are held in two variables so I believe I need to access the array elements to compare these. I am using ksh 88 and the code I have tried is below:
for file in ${origfilelist}
do
if ]]
then
print -- "File ${file}... (3 Replies)
Hi,
I need to compare a file with its contents matching to that of another file(filename , received date and record count).
Lets say has File A original data
Ex -
1,abc,1234
2,bcd,4567
3,cde,8901
and File B has details of File A
Ex-
FILEA.TXT|06/17|2010|3
(filename)|(received... (18 Replies)
I am looking at some practice problems from a book involving the time utility and I am a little confused on what to do. Here is what it is telling me to do:
-Compile your sort:
gcc -o sort1 sort1.c quicksort.c
-For each input file, ins.n0000, get the time to execute:
time sort1 <... (7 Replies)
Hello
Take this file...
Test01
Ref test
Version 01
Test02
Ref test
Version 02
Test66
Ref test
Version 66
Test99
Ref test
Version 99
I want to substitute every occurrence of Test{2} with a unique random number, so for example, if I was using sed, substitution would be something... (1 Reply)