Code Monkey home page Code Monkey logo

array-diff-perl's Introduction

This is Perl module Array::Diff.

INSTALLATION

Array::Diff installation is straightforward. If your CPAN shell is set up,
you should just be able to do

    % cpan Array::Diff

Download it, unpack it, then build it as per the usual:

    % perl Makefile.PL
    % make && make test

Then install it:

    % make install

DOCUMENTATION

Array::Diff documentation is available as in POD. So you can do:

    % perldoc Array::Diff

to read the documentation online with your favorite pager.

Daisuke Murase

array-diff-perl's People

Contributors

dsteinbrunner avatar typester avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

array-diff-perl's Issues

RT#101707 Array::Diff->count returns wrong number

Imported from https://rt.cpan.org/Public/Bug/Display.html?id=101707

Hello!

Bug is reproducible with simple example:

!/usr/bin/perl

use warnings;
use strict;
use Array::Diff;
use Data::Dumper;

my $old = [ 'a' ];
my @new = ( 'b', 'c', 'd' );

my $diff = Array::Diff->diff( $old, @new );
my $cnt = $diff->count;
my $add_ref = $diff->added;
my $del_ref = $diff->deleted;

print "cnt=$cnt\n";

print "add: ", Dumper( $add_ref ), "\n";
print "del: ", Dumper( $del_ref ), "\n";

print "add-list: ", @{$add_ref}, "\n";
print "del-list: ", @{$del_ref}, "\n";

END

cnt=1
add: $VAR1 = [
'b',
'c',
'd'
];

del: $VAR1 = [
'a'
];

add-list: bcd
del-list: a

$diff->count should be 4, not 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.