Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 35.064.619 Times

File::DirCompare 0.3

  Date Added: April 02, 2010  |  Visits: 926

File::DirCompare

Report Broken Link
Printer Friendly Version


Product Homepage
Download (91 downloads)



File::DirCompare is a Perl module to compare two directories using callbacks. SYNOPSIS use File::DirCompare; # Simple diff -r --brief replacement use File::Basename; File::DirCompare->compare($dir1, $dir2, sub { my ($a, $b) = @_; if (! $b) { printf "Only in %s: %sn", dirname($a), basename($a); } elsif (! $a) { printf "Only in %s: %sn", dirname($b), basename($b); } else { print "Files $a and $b differn"; } }); # Version-control like Deleted/Added/Modified listing my (@listing, @modified); # use closure to collect results File::DirCompare->compare(old_tree, new_tree), sub { my ($a, $b) = @_; if (! $b) { push @listing, "D $a"; } elsif (! $a) { push @listing, "A $b"; } else { if (-f $a && -f $b) { push @listing, "M $b"; push @modified, $b; } else { # One file, one directory - treat as delete + add push @listing, "D $a"; push @listing, "A $b"; } } }); File::DirCompare is a perl module to compare two directories using a callback, invoked for all files that are different between the two directories, and for any files that exist only in one or other directory (unique files). File::DirCompare has a single public compare() method, with the following signature: File::DirCompare->compare($dir1, $dir2, $sub, $opts); The first three arguments are required - $dir1 and $dir2 are paths to the two directories to be compared, and $sub is the subroutine reference called for all unique or different files. $opts is an optional hashref of options - see OPTIONS below. The provided subroutine is called for all unique files, and for every pair of different files encountered, with the following signature: $sub->($file1, $file2) where $file1 and $file2 are the paths to the two files. For unique files i.e. where a file exists in only one directory, the subroutine is called with the other argument undef i.e. for: $sub->($file1, undef) $sub->(undef, $file2) the first indicates $file1 exists only in the first directory given ($dir1), and the second indicates $file2 exists only in the second directory given ($dir2)..

Requirements: No special requirements
Platforms: Linux
Keyword: Compare Dircompare Directories Filedircompare Files Libraries Listing Perl Perl Module Programming
Users rating: 0/10

License: Freeware Size: 8.19 KB
USER REVIEWS
More Reviews or Write Review


FILE::DIRCOMPARE RELATED
Libraries  -  RPM::Util::Files 0.10
RPM::Util::Files is a Perl module to generate %files list in RPM Specfile. SYNOPSIS use RPM::Util::Files; my $util = RPM::Util::Files->new({ build_root => /var/tmp/some-package-version-root, docs_filters => [ sub { my $entry = shift;...
5.12 KB  
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  Include 1.02a
Include is a Perl module that allow you to use #defines from C header files. SYNOPSIS use Include qw(-I /some/path/of/mine); use Include q ; use Include q "/[A-Z]/"; The Include module implements a method of...
6.14 KB  
Libraries  -  XML::Writer::Simple 0.01
XML::Writer::Simple is a Perl module to create XML files easily! SYNOPSIS use XML::Writer::Simple dtd => "file.dtd"; print para("foo",b("bar"),"zbr"); USAGE This module takes some ideas from CGI to make easier the life for those who need...
4.1 KB  
Libraries  -  Video::Info::RIFF 0.993
Video::Info::RIFF is a Perl module that can probe DivX and AVI files for attributes like: -video codec -audio codec -frame height -frame width -frame count and more! SYNOPSIS use Video::Info::RIFF; my $video; $video =...
634.88 KB  
Libraries  -  WebFS::FileCopy 1.04
WebFS::FileCopy is a Perl module to get, put, move, copy, and delete files located by URIs. SYNOPSIS use WebFS::FileCopy; my @res = get_urls(ftp://www.perl.com, http://www.netscape.com); print $res[0]->content if $res[0]->is_success; #...
22.53 KB  
Libraries  -  XML::ApacheFOP 0.03
XML::ApacheFOP is a Perl module that can access Apache FOP from Perl to create PDF files using XSL-FO. SYNOPSIS use XML::ApacheFOP; my $Fop = XML::ApacheFOP->new(); # create a PDF using a xml/xsl tranformation $Fop->fop(xml=>"foo.xml",...
7.17 KB  
Libraries  -  MP3::Find 0.06
MP3::Find is a Perl module to search and sort MP3 files based on their ID3 tags. SYNOPSIS # select with backend you want use MP3::Find qw(Filesystem); print "$_n" foreach find_mp3s( dir => /home/peter/cds, query => { artist => ilyaimy,...
29.7 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB