view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/PluginBundle/PERLSRVDE.pm view on Meta::CPAN
use Dist::Zilla::Plugin::PodWeaver;
use Dist::Zilla::Plugin::Git::Contributors;
use Dist::Zilla::Plugin::PodSyntaxTests;
use Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable;
use Dist::Zilla::Plugin::Test::NoTabs;
use Dist::Zilla::Plugin::Test::NoBOM;
use Dist::Zilla::Plugin::Test::Perl::Critic;
use Dist::Zilla::Plugin::ExecDir;
use Dist::Zilla::Plugin::MetaJSON;
use Dist::Zilla::Plugin::MetaProvides::Package;
use Dist::Zilla::Plugin::ReadmeAnyFromPod;
lib/Dist/Zilla/PluginBundle/PERLSRVDE.pm view on Meta::CPAN
],
qw/
PodSyntaxTests
Test::NoTabs
Test::NoBOM
Test::Perl::Critic
MetaJSON
MetaProvides::Package
lib/Dist/Zilla/PluginBundle/PERLSRVDE.pm view on Meta::CPAN
include_authors = 1
[PodSyntaxTests]
[Test::Pod::Coverage::Configurable]
[Test::NoTabs]
[Test::NoBOM]
[Test::Perl::Critic]
[MetaProvides::Package]
[MetaJSON]
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/CycloneDX.pm view on Meta::CPAN
use Carp;
use Dist::Zilla::File::InMemory;
use Time::Piece;
use URI::PackageURL;
use SBOM::CycloneDX 1.08;
use SBOM::CycloneDX::Component;
use SBOM::CycloneDX::ExternalReference;
use SBOM::CycloneDX::License;
use SBOM::CycloneDX::Metadata;
use SBOM::CycloneDX::Metadata::Lifecycle;
use SBOM::CycloneDX::OrganizationalContact;
use SBOM::CycloneDX::Tools;
use SBOM::CycloneDX::Util qw/cpan_meta_to_spdx_license cyclonedx_component/;
has filename => (
is => 'ro',
isa => Str,
lazy => 1,
lib/Dist/Zilla/Plugin/CycloneDX.pm view on Meta::CPAN
x_twitter => 'social',
x_wiki => 'documentation',
);
my sub make_externs($module, $resources) {
my @externs = SBOM::CycloneDX::ExternalReference->new(type => 'documentation', url => "https://metacpan.org/pod/$module");
if (my $tracker = $resources->{bugtracker}{web}) {
push @externs, SBOM::CycloneDX::ExternalReference->new(type => 'issue-tracker', url => $tracker);
}
if (my $repo = $resources->{repository}{web}) {
push @externs, SBOM::CycloneDX::ExternalReference->new(type => 'vcs', url => $repo);
}
if (my $irc = $resources->{x_IRC}) {
my $url = ref $irc ? $irc->{url} : $irc;
push @externs, SBOM::CycloneDX::ExternalReference->new(type => 'chat', url => $url);
}
for my $key (keys %simple_resource) {
if (my $url = $resources->{$key}) {
push @externs, SBOM::CycloneDX::ExternalReference->new(type => $simple_resource{$key}, url => $url);
}
}
return sort { $a->type cmp $b->type } @externs;
}
lib/Dist/Zilla/Plugin/CycloneDX.pm view on Meta::CPAN
my $purl = make_purl($meta->{name}, $meta->{version});
my $bom_ref = sprintf '%s@%s', $meta->{name}, $meta->{version};
my $module = $meta->{name} =~ s/-/::/gr;
my @externs = make_externs($module, $meta->{resources});
return SBOM::CycloneDX::Component->new(
type => 'library',
group => 'CPAN',
name => $meta->{name},
version => $meta->{version},
description => $meta->{abstract},
lib/Dist/Zilla/Plugin/CycloneDX.pm view on Meta::CPAN
);
}
my sub to_organization($author) {
my ($name, $email) = $author =~ /([^<]+?)\s+<([^>]+)>/ or croak "Could not parse author '$author'";
return SBOM::CycloneDX::OrganizationalContact->new(name => $name, email => $email);
}
my sub make_licenses($meta) {
if (my $spdx_expr = $meta->{x_spdx_expression}) {
return SBOM::CycloneDX::License->new($spdx_expr);
} else {
my @raw = map { cpan_meta_to_spdx_license($_) } $meta->{license}->@*;
return map { SBOM::CycloneDX::License->new($_) } @raw;
}
}
my %self_resources = (
bugtracker => {
lib/Dist/Zilla/Plugin/CycloneDX.pm view on Meta::CPAN
);
if ($version) {
$args{version} = $version;
$args{purl} = make_purl($dist, $version);
}
return SBOM::CycloneDX::Component->new(%args);
}
my sub make_tools($plugins) {
my $distname = __PACKAGE__ =~ s/::/-/gr;
my @tools = make_tool_component(__PACKAGE__, $distname, \%self_resources);
push @tools, map { make_tool_component(ref($_), $_->cyclonedx_dist, $_->cyclonedx_resources) } $plugins->@*;
push @tools, cyclonedx_component;
return SBOM::CycloneDX::Tools->new(components => \@tools);
}
my sub make_metadata($meta, $plugins) {
my $component = make_root_component($meta);
my @authors = map { to_organization($_) } $meta->{author}->@*;
my $timestamp = SBOM::CycloneDX::Timestamp->new($ENV{TIMESTAMP} // scalar gmtime);
my @licenses = make_licenses($meta);
my @lifecycle = SBOM::CycloneDX::Metadata::Lifecycle->new(phase => 'pre-build');
my $tools = make_tools($plugins);
return SBOM::CycloneDX::Metadata->new(
component => $component,
authors => \@authors,
timestamp => $timestamp,
licenses => \@licenses,
lifecycles => \@lifecycle,
lib/Dist/Zilla/Plugin/CycloneDX.pm view on Meta::CPAN
}
sub gather_files($self) {
my @plugins = $self->zilla->plugins_with(-CycloneDXSource)->@*;
my $metadata = make_metadata($self->zilla->distmeta, \@plugins);
my $bom = SBOM::CycloneDX->new(metadata => $metadata);
for my $plugin (@plugins) {
$plugin->add_to_bom($bom);
}
local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /Net::IDN::Encode/ };
if (my @errors = $bom->validate) {
croak "Errors found in BOM: @errors";
}
$self->add_file(Dist::Zilla::File::InMemory->new(
name => $self->filename,
encoded_content => $bom->to_string,
lib/Dist/Zilla/Plugin/CycloneDX.pm view on Meta::CPAN
version 0.001
=head1 DESCRIPTION
This module adds a CycloneDX SBOM file to your distribution. By default this will only contain information that's already contained in the META files, but this can be extended by other plugins that implement the L<CycloneDXSource|Dist::Zilla::Role::C...
=head1 AUTHOR
Leon Timmermans <fawaka@gmail.com>
view all matches for this distribution
view release on metacpan or search on metacpan
dist_zilla_docker_api_plugin_plan.md view on Meta::CPAN
Use this only for post-release work, such as:
```text
- write docker-release.json
- print digest summary
- create provenance/SBOM later
- cleanup temp build context
```
---
dist_zilla_docker_api_plugin_plan.md view on Meta::CPAN
- cache_from/cache_to if supported
- platform if safely supported
- target stage
- network mode
- provenance/SBOM hooks if the API path supports them
---
## Minimal skeleton
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/ReportVersions.pm view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
}
else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
}
},
"develop" : {
"requires" : {
"Pod::Coverage::TrustPod" : "0",
"Test::BOM" : "0",
"Test::More" : "0.88",
"Test::NoTabs" : "0",
"Test::Perl::Critic" : "0",
"Test::Pod" : "1.41",
"Test::Pod::Coverage" : "1.08"
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error( "Did not provide a string to load" );
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error( "Stream has a non UTF-8 BOM" );
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
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
lib/Dist/Zilla/Plugin/Test/NoBOM.pm view on Meta::CPAN
$self->zilla->register_prereqs(
{
phase => 'develop',
type => 'requires',
},
'Test::BOM' => 0,
'Test::More' => 0
);
}
sub gather_files {
lib/Dist/Zilla/Plugin/Test/NoBOM.pm view on Meta::CPAN
=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
lib/Dist/Zilla/Plugin/Test/NoBOM.pm view on Meta::CPAN
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>
lib/Dist/Zilla/Plugin/Test/NoBOM.pm view on Meta::CPAN
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) }}
);
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
}
else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Web/FileHeader.pm view on Meta::CPAN
$Dist::Zilla::Plugin::Web::FileHeader::VERSION = '0.0.10';
# ABSTRACT: Prepend header to files
use Moose;
use Path::Class;
use String::BOM qw(strip_bom_from_string);
with 'Dist::Zilla::Role::FileMunger';
with 'Dist::Zilla::Plugin::Web::Role::FileMatcher';
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
}
else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
utils/remove_bom.pl view on Meta::CPAN
close $rfh or warn "Closing $file read failed";
close $wfh or warn "Closing $file write failed";
path( $file . '.new' )->move($file);
}
pp( { BOM => $bomb } );
for my $file (@ARGV) {
my $path = path($file);
*STDERR->print("Checking $path\n");
my $bom_bytes = read_bom_segment($path);
next unless is_bom($bom_bytes);
*STDERR->print("BOM found, rewriting\n");
rewrite_without_bom($path);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
Notes/cpan-namespaces/cpan-dzil-plugins.txt view on Meta::CPAN
Dist::Zilla::Plugin::Test::Legal
Dist::Zilla::Plugin::Test::LocalBrew
Dist::Zilla::Plugin::Test::Map
Dist::Zilla::Plugin::Test::Map::Tube
Dist::Zilla::Plugin::Test::MinimumVersion
Dist::Zilla::Plugin::Test::NoBOM
Dist::Zilla::Plugin::Test::NoBreakpoints
Dist::Zilla::Plugin::Test::NoSmartComments
Dist::Zilla::Plugin::Test::NoTabs
Dist::Zilla::Plugin::Test::PAUSE
Dist::Zilla::Plugin::Test::PAUSE::Permissions
Notes/cpan-namespaces/cpan-dzil-plugins.txt view on Meta::CPAN
Dist::Zilla::Plugin::Web::PkgVersion
Dist::Zilla::Plugin::Web::RelaxedVersion
Dist::Zilla::Plugin::Web::Require
Dist::Zilla::Plugin::Web::Role
Dist::Zilla::Plugin::Web::Role::FileMatcher
Dist::Zilla::Plugin::Web::StripBOM
Dist::Zilla::Plugin::WordList
Dist::Zilla::Plugin::WordListC
Dist::Zilla::Plugin::WriteVersion
Dist::Zilla::Plugin::XSVersion
Dist::Zilla::Plugin::if
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
}
else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dita/Validate.pm view on Meta::CPAN
"apply" => "eNrt2ctu2+gZBuB9r0LIqgWy0IGipAFaoMCgN1F0Qcu0w0ISPTo4DoK590qWM4j4f8Is+y0ebwLH\nr/7zgdTzsGkPh79+/8to9Gn8aTQa/f0fo3+fdo/t0+fRxz/fR83Ly+bb5S+Tqh79/vGH/3y+fGby\n4zPnX376uX70z//v++2vo1HzcBgNfy4VT+efi+juMYwGyff2l8kouO/fimBQ4...
"area" => "eNpLykktLtao5lJQUDJQUrC1U4guzUtJTdNRgFLVColFqYkgCUOFWqhorA5IuSF25cUZiQWpIBkj\nkHoDiFoj7GqT8/OLUopBUsZIio2xK64oSk0DSZggKTXBphRKGQKVAFUquSSWJFpZubg5KmkCAKhr\nQR0=\n",
"author" => "eNrt3M2K4kAUhuH9XEWo1QwomPjfMAMNTd/EMItSSw1aFalUtBvx3ieO0ppUYHZn9brRJF/qJx6f\n1cHF3pTl9/O3JFEDlSQ/fyW/K7cy615yfzsnugrbwl8vZdPkcr/wp3e9Jb3fUn9+vG43/u/UuXFU\nj6UXC2+OuQ5m1V8X3qp/M456Ue6QO22Nepyqc7MotrSrOJamUW6lg1aNU3Vu2...
"b" => "eNrt3Mtu20YUBuB9n0LQqgVswLrZToAWKBD0JYouaIm2CYukQpFOgiDvXjJWYotDILuz+rxxLPwZ\nzuVw9K3O3T4/Hn//+ttsNr+az2Z//jX7t6t2+f3F7PTr6+xu+HSzmn07ffbfxZBenNL9v19/Xv7P\nrz76evZXP1Z2d9fkz0XW5rvL+7op58PI69VFkjsUVVbm89eP+twiid3NZ6OfP...
"bind" => "eNrt2ctu48gVBuB9nkLoVQL0QiKp2wAJEGCQlwiyoGXaw0AXj0S5u9GYd48sewYt1hFmmbP4vGnY\n/avuVSzqe9h2p9Nfv/9lMvk0/TSZTP7+j8m/z/vH7unz5OOf75OHfv/49h+zZjH57ePv//n89pHZ\n7x+5/PLDz/sn//xv329/nUzah9Nk/PNW8az+XEQvbYqiTZl8edl+C5JR8Hj4W...
"body" => "eNrt3ctum0AUxvF9nwKxaiVbMuBrpFaqFPUlqi7GMCE0XBwuaVLL716wHdtwiPoA55+NY/wxw8wc\n57c6yja1VfV5/8lx3JnrOF+/OT+bPLIPE+f8sne2RfTWfRCsnMP58q9Jd4N3vqH9/fpzuu1/l/a9\nd+1Y3SRR8uJeL3UzzifDXFhEdpsW4ZN7k/MWIheZ2ri9S23OH89NzbZoavcmt...
"bodydiv" => "eNrt18lu48oVBuB9nkLQKgHagObhAgkQ4CIvEWRBSbTNtKamKLedRr97SNttS6q6yQOczxtPv2o6\nVUV+q215Ov35x596vf6g3+v99W+9f573m/L+S+/924/e6rB52VRP3f8Wo97P9//860v3meH7Z9qf\nP7/ePvn//vTj6re2rWK1qsunqmjKzd39od71u5ZH4y9J7ljti13Z//xTmxsPk...
"brand" => "eNrt3E2r2kAUxvF9P0WYVQsKJr5faKFw6ZcoXYxm9AaTiUxGvRfxu3escjWZQHdn9XejiU/mJTn+\nVgdXpWmar+cvSaJGKkm+/0h+H2xuNoPk/nZOVk7b/PpNNk8u9/N/Btcr0vsV4fPjdbvuf6fOraMw\nll6tnDkW2pt8uKldpf7NOBlEuX1hdWXU41TILaLYusrjWJpGuVx7rVqnQm7eG...
"bvar" => "eNpLykktLtao5lJQUDJQUrC1U4guzUtJTdNRgFLVCklliUUgCUOFWqhorA5IuSF25cmZIGEjHYXi\n1NzEvJLM5GIQ3xik2QCi0QibRihlCFFiTEAJ0DAll8SSRCsrFzdHJU0AeCE22Q==\n",
"category" => "eNrt3M2O2jAUhuF9ryLyqpVAIuF/pFaqNOpNVF0Y8DAR2EGOgUGIe68paCBxpO7O6mUDSb74Jxye\n1RGLranrr+cvWaYGKsu+/8h+793KvPWy+9s5W+pg1pU/XS8W0+xyv/Snd70pv98UPz9et1v/d+rc\nOIpj6cXCm0MZp1v13ypv1b8ZR70ktyudtkY9TsXcLIkt7SqN5XmSW+mgVeNUz...
"cause" => "eNrt281u2kAUhuF9r8LyqpVAwjghEKmVKkW9iaqLwQzEjX/IeJymjXLvHQNJsI8zs6tU6c2GYD7m\nzwc/q7MudNN8fPoQRfEsjqLPX6LvbbXR20l0enmKMtU2uvskiZ5Pl39Mui8kpy+4/9/+jl8LXXrq\nvXNjZfVGr4s6u4tfLnUTLibD3EZZFfcuudx8PDdV67q18VluKXP5Q3+4Qy6Vu...
lib/Dita/Validate.pm view on Meta::CPAN
"msrow" => "eNrt2ctuG8kVBuB9nkLwKgG8YJPN2wAJEGCQlwiyaFEtDTO8uUlqbAzm3UOK8pjddYQAZ/15Y8j+\nVfeqru7vcdMej3/9/S8PD59Gnx4eHv7+j4d/n3dP7fPnh/e/fn/YHrv9b9f/qeajhz/e/+M/n6+/\nU33/ncsPd39uv/r//+33/o8PD83jsf8P11rH089FbvdU5CZl6nDYfBuWFqW6/...
"mstack" => "eNrt2ctuG8kVBuB9nkLwKgG8YPPOARIgwCAvEWTRoloyM82Lm6THxmDePaQo2+yuI2R9gM8bQ/av\nuld1dX+PbXM8/vWPvzw8fBh9eHh4+Ps/Hv593j01zx8f3v7642F7PNXr367/VS0mD3++/c9/Pl5/\nqfr+S5cf7v7cfvf//9sf/R8fHurHY/8frrWOZx+L3O6pyE3K1OHQfhuWFqW6/...
"mstyle" => "eNrt2dtu29gVBuD7PoWRqxbIhShRpwFaoMCgL1H0gpZpjzrUIRSViTGYd69kORNxr2X0Bb7cBE5+\n7/Pe3OT32LWn019//8vDw6fJp4eHh7//4+Hf5/1T+/z54f2v3x92p+G1a6//VS3WD3+8/89/Pl9/\nqfr+S5cf7v7cfvf//9vv4x8fHprH0/gfrrVO559Dbv8UcrOYOh6717K0LNUfv...
"msub" => "eNrt2s2OG0l2BtC9n6KglQ30ghmRSTIHsAEDA7+E4QXFotT08KeaZKklNObdXVSpR0XmLcxdOTZn\nNg1pPuXPzciIuHn4cbc5n//1j395ePgw+/Dw8PDv//Hw38+Hx82nXx5+/OePh/35+eP1/+ge/v7j\nb//nl+s/6P78By9/ePO/13/3z//uj9s/PjysPp5v/+J6zrL4ZZI7PE5ywzT19...
"msubsup" => "eNrt3MuOJEeWHuC9nqLA1QjoRZj5JSIG0AACBnoJQYtkVrI6NXnrzCw2iUa/u7IuFCvDf4PORuOb\nj5sCyVMe7sfNzezY524/3928vPzLP/7Lhw8/HX768OHDf/u3D//z88PHm1/+8uH7H//4cP/y+eeX\nz09f/l/78M/v/+N//eXL32l//J23f/nhn29/9f/93/7x/l8/fLj6+eX9f3g79...
"msup" => "eNrt2s2OG0l2BtC9n6KglQ30ghmRSWYOYAMGBn4JwwuKRanpYZHVJEstoTHv7iqVelRk3sLclWNz\nZtOQ5lP+3IyMiJuHH/fb8/lf//iXu7sPiw93d3f//h93//10uN9++uXux3/+uHs4Pz2+/B/d3d9/\n/O3//PLyD7o//8HzH9787/Xf/fO/++P6j3d364/n6794OWdZ/TLLHe5nuWGee...
"mtable" => "eNpLykktLtao5lJQUDJQUrC1U4guzUtJTdNRgFLVCrkliUk5qSApY4VaqHisDkiDIQ4NOYlJqTmp\nKSVFIGkjHaAJYJYhSLshRKsR+VqNydQKpJRcEksSraxc3ByVNAHFdkX0\n",
"mtd" => "eNrt2ctu48gVBuB9nsLoVQL0QpSo2wAJEGCQlwiyoGXaowx1aYrydGMw7x7Jck+LdY6RF/h607Dx\nu+5VLPJ77NrT6a+//+Xh4dPk08PDw9//8fDv8/6pff788P7f7w+74en6+2qxfvjj/df/+Xz9i+r7\nX1x+uPt3+8P//7vfxz8+PDSPp/EvrrVO559Dbv8UcrOYOh67b2VpWao/fC1Sy...
"mtext" => "eNpLykktLtao5lJQUDJQUrC1U4guzUtJTdNRgFLVCrklqRUlIBljhVqocKwOSL0hDvWJOZnpebmJ\nRdkgaSMdhdz0nMqCDBDHEGSCIUS3EUW6jcnXDaSUXBJLEq2sXNwclTQBh3dJgA==\n",
"mtr" => "eNpLykktLtao5lJQUDJQUrC1U4guzUtJTdNRgFLVCrklRSBxI4VaqGCsDki1IS7VKSBxQ5BqQ4hK\nI+JUAikll8SSRCsrFzdHJU0A2o4ppg==\n",
"munder" => "eNrt2s2OG0l2BtC9n6KglQ30ghmRSWYOYAMGBn4JwwuKRanpYZHVJEstoTHv7iqVelRk3sLclWNz\nZtOj7k/5czMyIm4eftxvz+d//eNf7u4+LD7c3d39+3/c/ffT4X776Ze7H//44+7h5f+dXv5Td/f3\nH//+f355+Svdn3/l+Q9v/vf6N//5v/vj+o93d+uP5+t/8XLOsvplljvcz3LDP...
"munderover" => "eNrt3MuOJEeWHuC9nqLA1QjoRZj5JSIG0AACBnoJQYtkVrI6NXnrzCw2iUa/u7IuFCvDf4PORuOb\nrzfsIk95uB83N7Njn7v9fHfz8vIv//gvHz78dPjpw4cP/+3fPvzPzw8fb375y4fv//jHh/sv/+/5\n8deb5y//uX345/f/9r/+8uWvtT/+2tsffvjft7/9//53/3j/xw8frn5+ef8v3...
"navtitle" => "eNrt3EtP60YYBuB9f0WUVSsRiVy4HamVKh31T1RdmMSARXypY8NBiP9eG8IBeyx1ySyebCDJm7Fn\nvhk/u+96nx4Ovz7/MpvNT+ez2e9/zP5ui116czI7/nmeFclDkzX7tP9yczF7OX71z0n/o+XxR93/\nH6+3n/7fR8+Dd91YyfV1nT5kSZPuFjdlnc/7kVebkyBXZUWSp/OPj7rcZRC7n...
"note" => "eNrt3c1u20YUBtB9n0LQqgViIJL1YwdogQJBX6LogpJom40kKhTlOAjy7iVtR5Y0E3Rzl8cbx871\nkJy5M9RZfYt1ud//+u2XwWD4fjgY/P7H4O/DdlXevRu8fvs22NZt2f/H/Gbw/fXX/7zr/2D0+gfd\nv9++Xv7s/3717eynbqxisWjKx6poy9XVXd1shv3I4+t3Sd2u2habcvj2q67ue...
"numcharref" => "eNpLykktLtao5lJQUDJQUrC1U4guzUtJTdNRgFLVCnmluckZiUVFqWkgaROFWqhcrA5IkyFEE5AJ\nBxCd+EWqFZRSihLTSnST83NzU/NKwKYY6igoFaUWlmYWpaboJuekJuaVFoAljIASJakVEFXGQBcg\nG2WIxIO4yWgQusl4ELrJZLC5CZi0lFwSSxKtrFzcHJU0ARefmpU=\n",
"object" => "eNpLykktLtao5lJQUDJQUrC1U4guzUtJTdNRgFLVCvlJWanJJSApQ4VaqHisDkiDIUQDkAkHEF34\nRaqROUBjUlKLk5UQfKCRZjpoStLyi1Iz0/OUEEqM0JXk5Oelg0wqSk1TgiixQFeSm1iSkZujhGSR\nMbqSgsSixFwlZLeYoyspLkvXTc7PK0nMzEstAoeACbqS0rzsvPxyZOeaoiipR...
view all matches for this distribution