Dist-Zilla-Plugin-Test-NoBOM
view release on metacpan or search on metacpan
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
0.003 2023-07-21 15:07:53 Europe/Berlin
[Fixed]
[#4] Declared dependency Test::BOM.
0.002 2018-09-27 10:37:21 Europe/Berlin
[Changed]
Removed failing test I copied from DPT::NoTabs and tried to adapt.
Unlucklily I didn't succeed and the test still fails on some
systems (thanks to the CPAN Testers).
0.001 2018-09-26 12:02:36 Europe/Berlin
This is the Perl distribution Dist-Zilla-Plugin-Test-NoBOM.
Installing Dist-Zilla-Plugin-Test-NoBOM is straightforward.
## Installation with cpanm
If you have cpanm, you only need one line:
% cpanm Dist::Zilla::Plugin::Test::NoBOM
If it does not have permission to install modules to the current perl, cpanm
will automatically set up and install to a local::lib in your home directory.
See the local::lib documentation (https://metacpan.org/pod/local::lib) for
details on enabling it in your environment.
## Installing with the CPAN shell
Alternatively, if your CPAN shell is set up, you should just be able to do:
% cpan Dist::Zilla::Plugin::Test::NoBOM
## Manual installation
As a last resort, you can manually install it. If you have not already
downloaded the release tarball, you can find the download link on the module's
MetaCPAN page: https://metacpan.org/pod/Dist::Zilla::Plugin::Test::NoBOM
Untar the tarball, install configure prerequisites (see below), then build it:
% perl Makefile.PL
% make && make test
Then install it:
% make install
* to run make, PHASE = build
* to use the module code itself, PHASE = runtime
* to run tests, PHASE = test
They can all be found in the "PHASE_requires" key of MYMETA.yml or the
.
## Documentation
Dist-Zilla-Plugin-Test-NoBOM documentation is available as POD.
You can run `perldoc` from a shell to read the documentation:
% perldoc Dist::Zilla::Plugin::Test::NoBOM
For more information on installing Perl modules via CPAN, please see:
https://www.cpan.org/modules/INSTALL.html
# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.030.
Changes
INSTALL
LICENSE
MANIFEST
META.yml
Makefile.PL
README
cpanfile
dist.ini
lib/Dist/Zilla/Plugin/Test/NoBOM.pm
perlcritic.rc
t/author-critic.t
t/author-no-tabs.t
t/author-pod-coverage.t
t/author-pod-syntax.t
t/release-changes_has_content.t
---
abstract: 'Make sure files do not start with BOM'
author:
- 'Gregor Goldbach <glauschwuffel@gmail.com>'
build_requires:
perl: '5.006'
configure_requires:
ExtUtils::MakeMaker: '0'
perl: v5.4.5
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Dist-Zilla-Plugin-Test-NoBOM
requires:
Data::Section: '0.004'
Dist::Zilla::File::InMemory: '0'
Dist::Zilla::Role::FileFinderUser: '0'
Dist::Zilla::Role::FileGatherer: '0'
Dist::Zilla::Role::FileMunger: '0'
Dist::Zilla::Role::PrereqSource: '0'
Dist::Zilla::Role::TextTemplate: '0'
Moose: '0'
Moose::Util::TypeConstraints: '0'
Path::Tiny: '0'
Sub::Exporter::ForMethods: '0'
Test::BOM: '0'
namespace::autoclean: '0'
perl: '5.006'
resources:
bugtracker: https://gitlab.com/glauschwuffel/dist-zilla-plugin-test-nobom/issues
homepage: https://gitlab.com/glauschwuffel/dist-zilla-plugin-test-nobom
repository: https://gitlab.com/glauschwuffel/dist-zilla-plugin-test-nobom.git
version: '0.003'
x_generated_by_perl: v5.37.9
x_serialization_backend: 'YAML::Tiny version 1.74'
x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
Makefile.PL view on Meta::CPAN
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.030.
use strict;
use warnings;
use 5.006;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "Make sure files do not start with BOM",
"AUTHOR" => "Gregor Goldbach <glauschwuffel\@gmail.com>",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Dist-Zilla-Plugin-Test-NoBOM",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.006",
"NAME" => "Dist::Zilla::Plugin::Test::NoBOM",
"PREREQ_PM" => {
"Data::Section" => "0.004",
"Dist::Zilla::File::InMemory" => 0,
"Dist::Zilla::Role::FileFinderUser" => 0,
"Dist::Zilla::Role::FileGatherer" => 0,
"Dist::Zilla::Role::FileMunger" => 0,
"Dist::Zilla::Role::PrereqSource" => 0,
"Dist::Zilla::Role::TextTemplate" => 0,
"Moose" => 0,
"Moose::Util::TypeConstraints" => 0,
"Path::Tiny" => 0,
"Sub::Exporter::ForMethods" => 0,
"Test::BOM" => 0,
"namespace::autoclean" => 0
},
"VERSION" => "0.003",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
Makefile.PL view on Meta::CPAN
"Dist::Zilla::File::InMemory" => 0,
"Dist::Zilla::Role::FileFinderUser" => 0,
"Dist::Zilla::Role::FileGatherer" => 0,
"Dist::Zilla::Role::FileMunger" => 0,
"Dist::Zilla::Role::PrereqSource" => 0,
"Dist::Zilla::Role::TextTemplate" => 0,
"Moose" => 0,
"Moose::Util::TypeConstraints" => 0,
"Path::Tiny" => 0,
"Sub::Exporter::ForMethods" => 0,
"Test::BOM" => 0,
"namespace::autoclean" => 0
);
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
SYNOPSIS
In your dist.ini:
[Test::NoBOM]
finder = my_finder
finder = other_finder
DESCRIPTION
This is a plugin that runs at the gather files stage, providing the
file xt/author/no-bom.t. This test program use Test::BOM to make sure
that the files in your distribution don't start with a byte-order-mark
(BOM).
CONFIGURATION OPTIONS
This plugin accepts the following options:
finder
This is the name of a FileFinder for finding files to check. The
default value is :InstallModules, :ExecFiles (see also
Dist::Zilla::Plugin::ExecDir) and :TestFiles; this option can be used
requires 'Dist::Zilla::Plugin::ShareDir';
requires 'Dist::Zilla::Plugin::Test::ChangesHasContent';
requires 'Dist::Zilla::Plugin::Test::NoTabs';
requires 'Dist::Zilla::Plugin::Test::Perl::Critic';
requires 'Dist::Zilla::PluginBundle::Basic';
requires 'Dist::Zilla::PluginBundle::Git';
requires 'Dist::Zilla::App::Command::cover';
requires 'Test::Builder' => 0;
requires 'Test::Pod::Coverage' => 0;
requires 'Test::NoTabs' => 0;
requires 'Test::BOM' => 0;
name = Dist-Zilla-Plugin-Test-NoBOM
version = 0.003
abstract = Make sure files do not start with BOM
author = Gregor Goldbach <glauschwuffel@gmail.com>
main_module = lib/Dist/Zilla/Plugin/Test/NoBOM.pm
license = Perl_5
copyright_holder = Gregor Goldbach
[@Basic]
[AutoPrereqs]
[Prereqs]
Test::BOM = 0
[MinimumPerl]
[PkgVersion]
[CheckChangesHasContent]
[NextRelease]
format=%-9v%T %{yyyy-MM-dd HH:mm:ss VVVV}d
[@Git] ; has to run after NextRelease so we get the updates Changes file
lib/Dist/Zilla/Plugin/Test/NoBOM.pm view on Meta::CPAN
package Dist::Zilla::Plugin::Test::NoBOM;
$Dist::Zilla::Plugin::Test::NoBOM::VERSION = '0.003';
# ABSTRACT: Author tests that ensure BOM is not used
# KEYWORDS: plugin test testing author development BOM
use Moose;
use Path::Tiny;
use Sub::Exporter::ForMethods 'method_installer'; # method_installer returns a sub.
use Data::Section 0.004 # fixed header_re
{ installer => method_installer }, '-setup';
use Moose::Util::TypeConstraints 'role_type';
use namespace::autoclean;
with 'Dist::Zilla::Role::FileGatherer', 'Dist::Zilla::Role::FileMunger',
lib/Dist/Zilla/Plugin/Test/NoBOM.pm view on Meta::CPAN
sub mvp_multivalue_args { qw(files) }
sub mvp_aliases { return { file => 'files' } }
sub register_prereqs {
my $self = shift;
$self->zilla->register_prereqs(
{
phase => 'develop',
type => 'requires',
},
'Test::BOM' => 0,
'Test::More' => 0
);
}
sub gather_files {
my $self = shift;
require Dist::Zilla::File::InMemory;
$self->add_file(
lib/Dist/Zilla/Plugin/Test/NoBOM.pm view on Meta::CPAN
}
__PACKAGE__->meta->make_immutable;
=pod
=encoding UTF-8
=head1 NAME
Dist::Zilla::Plugin::Test::NoBOM - Author tests that ensure BOM is not used
=head1 VERSION
version 0.003
=head1 SYNOPSIS
In your F<dist.ini>:
[Test::NoBOM]
finder = my_finder
finder = other_finder
=head1 DESCRIPTION
This is a plugin that runs at the L<gather
files|Dist::Zilla::Role::FileGatherer> stage, providing the file
F<xt/author/no-bom.t>. This test program use L<Test::BOM> to
make sure that the files in your distribution don't start with a
byte-order-mark (BOM).
=for Pod::Coverage::TrustPod mvp_aliases
register_prereqs
gather_files
munge_files
=head1 CONFIGURATION OPTIONS
This plugin accepts the following options:
lib/Dist/Zilla/Plugin/Test/NoBOM.pm view on Meta::CPAN
a filename to also test, in addition to any files found
earlier. This option can be repeated to specify multiple additional files.
=head2 C<filename>
The filename of the test to add - defaults to F<xt/author/no-bom.t>.
=head1 SEE ALSO
=for :list * Test::BOM
=head1 AUTHOR
Gregor Goldbach <glauschwuffel@gmail.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2023 by Gregor Goldbach.
This is free software; you can redistribute it and/or modify it under
lib/Dist/Zilla/Plugin/Test/NoBOM.pm view on Meta::CPAN
=cut
__DATA__
___[ __TEST__ ]___
use strict;
use warnings;
# this test was generated with {{ ref $plugin }} {{ $plugin->VERSION }}
use Test::More 0.88;
use Test::BOM;
my @files = (
{{ join(",\n", map { " '" . $_ . "'" } map { s/'/\\'/g; $_ } sort @filenames) }}
);
ok(file_hasnt_bom($_)) for @files;
done_testing;
t/author-no-tabs.t view on Meta::CPAN
use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15
use Test::More 0.88;
use Test::NoTabs;
my @files = (
'lib/Dist/Zilla/Plugin/Test/NoBOM.pm', 't/author-critic.t',
't/author-no-tabs.t', 't/author-pod-coverage.t',
't/author-pod-syntax.t', 't/release-changes_has_content.t'
);
notabs_ok($_) foreach @files;
done_testing;
( run in 0.438 second using v1.01-cache-2.11-cpan-e9daa2b36ef )