Benchmark-Featureset-LocaleCountry

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN

	- Replace Locale::Country::SubCountry with WWW::Scraper::Wikipedia::ISO3166::Database V 1.01.
		This is because I have removed Locale::Country::SubCountry from CPAN due to the difficulty of
		keeping it up-to-date with native-language country/subcountry changes.
	- Update pre-reqs.

1.02  Wed Mar 14 12:00:00 2012
	- Fix bad typo in Benchmark::Featureset::LocaleCountry::Config left from careless copy-and-paste from another module.
	- Fix wrong name dir being used for that module (it was *::Util::*).
	- Clean up pod.
	- Re-generate the demo page with newer versions of some modules. See (as of 2012-03-14):
	-   http://savage.net.au/Perl-modules/html/locale.report.html

1.01  Tue Apr 19 17:20:00 2011
	- Make Build.PL and Makefile.PL run scripts/copy.config.pl.
	- Expand docs to discuss config/.htbenchmark.featureset.localecountry.conf, and scripts/copy.config.pl.
	  This section was missing from the docs in V 1.00.

1.00  Mon Apr 18 15:38:35 2011
	- Original version

Changelog.ini  view on Meta::CPAN

- Update pre-reqs.
EOT

[V 1.02]
Date=2012-03-14T12:00:00
Comments= <<EOT
- Fix bad typo in Benchmark::Featureset::LocaleCountry::Config left from careless copy-and-paste from another module.
- Fix wrong name dir being used for that module (it was *::Util::*).
- Clean up pod.
- Re-generate the demo page with newer versions of some modules. See (as of 2012-03-14):
- http://savage.net.au/Perl-modules/html/locale.report.html
EOT

[V 1.01]
Date=2011-04-19T17:20:00
Comments= <<EOT
- Make Build.PL and Makefile.PL run scripts/copy.config.pl.
- Expand docs to discuss config/.htbenchmark.featureset.localecountry.conf, and scripts/copy.config.pl.
This section was missing from the docs in V 1.00.
EOT

[V 1.00]
Date=2011-04-18T15:38:35
Comments=- Original version

MANIFEST  view on Meta::CPAN

Build.PL
Changelog.ini
CHANGES
config/.htbenchmark.featureset.localecountry.conf
htdocs/assets/css/benchmark/featureset/localecountry/default.css
htdocs/assets/css/benchmark/featureset/localecountry/fancy.table.css
htdocs/assets/css/benchmark/featureset/localecountry/web.page.css
htdocs/assets/templates/benchmark/featureset/localecountry/basic.column.tx
htdocs/assets/templates/benchmark/featureset/localecountry/basic.table.tx
htdocs/assets/templates/benchmark/featureset/localecountry/fancy.table.tx
htdocs/assets/templates/benchmark/featureset/localecountry/locale.report.tx
lib/Benchmark/Featureset/LocaleCountry.pm
lib/Benchmark/Featureset/LocaleCountry/Config.pm
Makefile.PL
MANIFEST			This list of files
META.json
META.yml
README
scripts/copy.config.pl
scripts/locale.report.pl
t/pod.t
t/test.t

config/.htbenchmark.featureset.localecountry.conf  view on Meta::CPAN

# o Values are case-sensitive.

host = localhost

[localhost]

# CSS stuff
# ---------
# This is a URL.
# My DocumentRoot:    /dev/shm/html.
# hence my disk path: /dev/shm/html/assets/css/benchmark/featureset/localecountry.

css_url = /assets/css/benchmark/featureset/localecountry

# Template stuff
# --------------
# This is a disk path, as used by Text::Xslate.
# These templates are for pages etc generated for this module.

template_path = /dev/shm/html/assets/templates/benchmark/featureset/localecountry

[webhost]

# TBA.

lib/Benchmark/Featureset/LocaleCountry.pm  view on Meta::CPAN

sub run
{
	my($self)                                         = @_;
	my($config)                                       = Benchmark::Featureset::LocaleCountry::Config -> new -> config;
	my($templater)                                    = $self -> build_templater($config);
	my($common_countries, $module_data, $module_list) = $self -> build_module_data;
	my($country_name_count)                           = $self -> build_country_data($module_data);

	print $templater -> render
		(
		 'locale.report.tx',
		 {
			 common_country_count   => $common_countries -> length,
			 country_name_count     => $country_name_count,
			 country_name_mismatch  => $self -> build_mismatched_countries($module_data, $common_countries),
			 default_css            => "$$config{css_url}/default.css",
			 #division_name_mismatch => $self -> build_mismatched_divisions($module_data, $common_countries),
			 environment            => $self -> build_environment,
			 fancy_table_css        => "$$config{css_url}/fancy.table.css",
			 module_data            => $module_list,
			 purpose                => $self -> build_purpose,

lib/Benchmark/Featureset/LocaleCountry.pm  view on Meta::CPAN


	use strict;
	use warnings;

	use Benchmark::Featureset::LocaleCountry;

	# ------------------------------

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

See scripts/locale.report.pl.

Hint: Redirect the output of that script to your $doc_root/locale.report.html.

L<View the report on my website|http://savage.net.au/Perl-modules/html/locale.report.html>.

=head1 Description

L<Benchmark::Featureset::LocaleCountry> compares some features of various modules:

=over 4

=item o L<Locale::Codes>

=item o L<Locale::Country::Multilingual>

lib/Benchmark/Featureset/LocaleCountry.pm  view on Meta::CPAN


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

=head2 The Configuration File

All that remains is to tell L<Benchmark::Featureset::LocaleCountry> your values for some options.

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

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

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

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

lib/Benchmark/Featureset/LocaleCountry.pm  view on Meta::CPAN

Returns an object of type Text::Xslate.

=head2 new()

For use by subclasses.

=head2 run()

Does the real work.

See scripts/locale.report.pl.

Hint: Redirect the output of that script to $doc_root/locale.report.html.

=head1 References

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

=head1 Machine-Readable Change Log

The file CHANGES was converted into Changelog.ini by L<Module::Metadata::Changes>.

=head1 Version Numbers

lib/Benchmark/Featureset/LocaleCountry/Config.pm  view on Meta::CPAN


# -----------------------------------------------

sub new
{
	my($class, %arg) = @_;
    my($self)        = bless {}, $class;

	$self -> init(\%arg);

	my($path) = Path::Class::file(File::HomeDir -> my_dist_config('Benchmark-Featureset-LocaleCountry'), '.htbenchmark.featureset.localecountry.conf');

	$self -> read($path);

    return $self;

} # End of new.

# -----------------------------------------------

sub read

lib/Benchmark/Featureset/LocaleCountry/Config.pm  view on Meta::CPAN

For use by subclasses.

=head2 read()

read() is called by new(). It does the actual reading of the config file.

If the file can't be read, die is called.

The path to the config file is determined by:

	Path::Class::file(File::HomeDir -> my_dist_config('Benchmark-Featureset-LocaleCountry'), '.htbenchmark.featureset.localecountry.conf');

During installation, you should have run scripts/copy.config.pl, which uses the same code, to move the config file
from the config/ directory in the disto into an OS-dependent directory.

The run-time code uses this module to look in the same directory as used by scripts/copy.config.pl.

=head1 Support

Email the author, or log a bug on RT:

scripts/copy.config.pl  view on Meta::CPAN

use File::HomeDir;

use Path::Class;

# ----------------------------------------

my($module)           = 'Benchmark::Featureset::LocaleCountry';
my($module_dir)       = $module;
$module_dir           =~ s/::/-/g;
my($dir_name)         = File::HomeDir -> my_dist_config($module_dir, {create => 1});
my($config_name)      = '.htbenchmark.featureset.localecountry.conf';
my($source_file_name) = Path::Class::file('config', $config_name);

if ($dir_name)
{
	File::Copy::copy($source_file_name, $dir_name);

	my($dest_file_name) = Path::Class::file($dir_name, $config_name);

	if (-e $dest_file_name)
	{



( run in 1.191 second using v1.01-cache-2.11-cpan-ceb78f64989 )