This file is indexed.

/usr/share/perl5/Mojolicious/Command/inflate.pm is in libmojolicious-perl 2.23-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
package Mojolicious::Command::inflate;
use Mojo::Base 'Mojo::Command';

use Getopt::Long 'GetOptions';
use Mojo::Loader;
use Mojo::Util 'encode';

has description => <<'EOF';
Inflate embedded files to real files.
EOF
has usage => <<"EOF";
usage: $0 inflate [OPTIONS]

These options are available:
  --class <class>      Class to inflate.
  --public <path>      Path prefix for generated static files, defaults to
                       "public".
  --templates <path>   Path prefix for generated template files, defaults to
                       "templates".
EOF

# "Come on stem cells! Work your astounding scientific nonsense!"
sub run {
  my $self = shift;

  # Options
  local @ARGV = @_;
  my $class     = 'main';
  my $public    = 'public';
  my $templates = 'templates';
  GetOptions(
    'class=s'     => sub { $class     = $_[1] },
    'public=s'    => sub { $public    = $_[1] },
    'templates=s' => sub { $templates = $_[1] },
  );

  # Load class
  my $e = Mojo::Loader->load($class);
  die $e if ref $e;

  # Generate
  my $all = $self->get_all_data($class);
  for my $file (keys %$all) {
    my $prefix = $file =~ /\.\w+\.\w+$/ ? $templates : $public;
    my $path = $self->rel_file("$prefix/$file");
    $self->write_file($path, encode('UTF-8', $all->{$file}));
  }
}

1;
__END__

=head1 NAME

Mojolicious::Command::inflate - Inflate command

=head1 SYNOPSIS

  use Mojolicious::Command::inflate;

  my $inflate = Mojolicious::Command::inflate->new;
  $inflate->run(@ARGV);

=head1 DESCRIPTION

L<Mojolicious::Command::inflate> turns all your embedded templates into real
ones.

=head1 ATTRIBUTES

L<Mojolicious::Command::inflate> inherits all attributes from
L<Mojo::Command> and implements the following new ones.

=head2 C<description>

  my $description = $inflate->description;
  $inflate        = $inflate->description('Foo!');

Short description of this command, used for the command list.

=head2 C<usage>

  my $usage = $inflate->usage;
  $inflate  = $inflate->usage('Foo!');

Usage information for this command, used for the help screen.

=head1 METHODS

L<Mojolicious::Command::inflate> inherits all methods from L<Mojo::Command>
and implements the following new ones.

=head2 C<run>

  $inflate->run(@ARGV);

Run this command.

=head1 SEE ALSO

L<Mojolicious>, L<Mojolicious::Guides>, L<http://mojolicio.us>.

=cut