Skip to content

Commit

Permalink
force mime builder to have it put correctly in ES (debugging WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickeyn committed Apr 26, 2016
1 parent 9af01ef commit 3e1b2f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions lib/MetaCPAN/Document/File.pm
Expand Up @@ -23,6 +23,13 @@ Plack::MIME->add_type( '.xs' => 'text/x-c' );

my @NOT_PERL_FILES = qw(SIGNATURE);

sub BUILD {
my $self = shift;

# force building of `mime`
$self->_build_mime;
}

=head1 PROPERTIES
=head2 abstract
Expand Down Expand Up @@ -604,9 +611,10 @@ MIME type of file. Derived using L<Plack::MIME> (for speed).
=cut

has mime => (
is => 'ro',
lazy => 1,
builder => '_build_mime',
required => 1,
is => 'ro',
lazy => 1,
builder => '_build_mime',
);

sub _build_mime {
Expand Down
2 changes: 1 addition & 1 deletion t/release/pod-examples.t
Expand Up @@ -9,7 +9,7 @@ use MetaCPAN::TestHelpers;
test_release(
'RWSTAUNER/Pod-Examples-99',
{
first => \1,
first => 1,
extra_tests => \&test_pod_examples,
main_module => 'Pod::Examples',
changes_file => 'Changes',
Expand Down

0 comments on commit 3e1b2f2

Please sign in to comment.