use Plack::Util::Accessor qw/style any_content_type even_if_styled use_link_header/;
our $VERSION = '0.001';
-our $DEFAULT_STYLE = <<EOF =~ y/\n\t //rd;
+our $DEFAULT_STYLE = <<'EOF' =~ y/\n\t //rd;
<style>
body {
margin:40px auto;
my $content_type =
Plack::Util::header_get($hdrs, 'Content-Type');
return '' unless $content_type;
- $content_type =~ m,text/html,i;
+ $content_type =~ m,text/html,is;
}
-sub call {
+sub call { ## no critic (Complexity)
my ($self, $env) = @_;
if ($self->use_link_header) {
my $req = Plack::Request->new($env);
if (lc $req->path eq lc $self->use_link_header) {
- my $days30 = 30 * 86400;
+ my $days30 = 30 * 86_400;
my @hdrs = (
'Content-Length' => length $self->style,
'Content-Type' => 'text/css',
$doctype_end //= $offset_end if $tagname eq 'doctype';
$styled = 1 if $tagname eq 'style';
$styled = 1 if $tagname eq 'link'
- && ($attr->{rel} // '') =~ /stylesheet/i;
+ && ($attr->{rel} // '') =~ /stylesheet/is;
};
my $p = HTML::Parser->new(api_version => 3);