View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Ron Savage > Benchmark-Featureset-SetOps > Benchmark::Featureset::SetOps



Annotate this POD


Open  0
View/Report Bugs
Module Version: 1.06   Source  


Benchmark::Featureset::SetOps - Compare various array/set handling modules

Synopsis ^

        #!/usr/bin/env perl

        use Benchmark::Featureset::SetOps;

        Benchmark::Featureset::SetOps -> new -> run;

See scripts/

Hint: Redirect the output of that script to your $doc_root/

A copy of the report ships in html/

View this report on my website.

Description ^

Benchmark::Featureset::SetOps compares various array/set handling modules.

The list of modules processed is shipped in data/module.list.ini, and can easily be edited before re-running:

        shell> scripts/
        shell> scripts/

The config stuff is explained below.

Distributions ^

This module is available as a Unix-style distro (*.tgz).

See for help on unpacking and installing distros.

Installation ^

The Module Itself

Install Benchmark::Featureset::SetOps as you would for any Perl module:


        cpanm Benchmark::Featureset::SetOps

or run:

        sudo cpan Benchmark::Featureset::SetOps

or unpack the distro, and then either:

        perl Build.PL
        ./Build test
        sudo ./Build install


        perl Makefile.PL
        make (or dmake or nmake)
        make test
        make install

The Configuration File

All that remains is to tell Benchmark::Featureset::SetOps your values for some options.

For that, see config/.htbenchmark.featureset.setops.conf.

If you are using Build.PL, running Build (without parameters) will run scripts/, as explained next.

If you are using Makefile.PL, running make (without parameters) will also run scripts/

Either way, before editing the config file, ensure you run scripts/ It will copy the config file using File::HomeDir, to a directory where the run-time code in Benchmark::Featureset::SetOps will look for it.

        shell>cd Benchmark-Featureset-SetOps-1.00
        shell>perl scripts/

Under Debian, this directory will be $HOME/.perl/Benchmark-Featureset-SetOps/. When you run, it will report where it has copied the config file to.

Check the docs for File::HomeDir to see what your operating system returns for a call to my_dist_config().

The point of this is that after the module is installed, the config file will be easily accessible and editable without needing permission to write to the directory structure in which modules are stored.

That's why File::HomeDir and Path::Class are pre-requisites for this module.

Although this is a good mechanism for modules which ship with their own config files, be advised that some CPAN tester machines run tests as users who don't have home directories, resulting in test failures.

Constructor and Initialization ^

new() is called as my($builder) = Benchmark::Featureset::SetOps -> new(k1 => v1, k2 => v2, ...).

It returns a new object of type Benchmark::Featureset::SetOps.

Key-value pairs in accepted in the parameter list (see corresponding methods for details):

o (None as yet)

Methods ^


For use by subclasses.


Does the real work.

See scripts/ and its output html/

Hint: Redirect the output of that script to $doc_root/


Where is the HTML template for the report?

Templates ship in htdocs/assets/templates/benchmark/featureset/setops/.

See also htdocs/assets/css/benchmark/featureset/setops/.

How did you choose the modules to review?

I maintain (but did not write) Set::Array. I have never really liked its interface, so when I started a home-grown script that Kim Ryan (author of Locale::SubCountry) and I use to compare his module with my WWW::Scraper::Wikipedia::ISO3166, I wondered if there was some module more to my liking. Hence the search for alternatives. Then I realized my work could benefit the Perl community if I formalized the results of this search.

Also, I have 7 modules on CPAN which use Set::Array, so I wanted a good idea of the array/set modules before I decided to switch.

Repository ^

See Also ^

The modules compared in this package often have links to various modules, which I won't repeat here...

The other module in this series is Benchmark::Featureset::LocaleCountry.

Machine-Readable Change Log ^

The file Changes was converted into Changelog.ini by Module::Metadata::Changes.

Version Numbers ^

Version numbers < 1.00 represent development versions. From 1.00 up, they are production versions.

Support ^

Email the author, or log a bug on RT:

Author ^

Benchmark::Featureset::SetOps was written by Ron Savage <> in 2012.

Home page:

Copyright ^

Australian copyright (c) 2012, Ron Savage.

        All Programs of mine are 'OSI Certified Open Source Software';
        you can redistribute them and/or modify them under the terms of
        The Artistic License, a copy of which is available at:
syntax highlighting: