This file is indexed.

/usr/share/perl5/Mojolicious/Command/version.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
package Mojolicious::Command::version;
use Mojo::Base 'Mojo::Command';

use Mojo::IOLoop::Server;
use Mojo::Server::Daemon;
use Mojo::UserAgent;
use Mojolicious;

has description => <<'EOF';
Show versions of installed modules.
EOF
has usage => <<"EOF";
usage: $0 version

EOF

# "It's so cold, my processor is running at peak efficiency!"
sub run {
  my $self = shift;

  # Latest version
  my ($current) = $Mojolicious::VERSION =~ /^([^_]+)/;
  my $latest = $current;
  eval {
    Mojo::UserAgent->new->max_redirects(3)
      ->get('search.cpan.org/dist/Mojolicious')->res->dom('.version')
      ->each(sub { $latest = $_->text if $_->text =~ /^[\d\.]+$/ });
  };

  # Message
  my $message = 'This version is up to date, have fun!';
  $message = 'Thanks for testing a development release, you are awesome!'
    if $latest < $current;
  $message = "You might want to update your Mojolicious to $latest."
    if $latest > $current;

  # EV
  my $ev = eval 'use Mojo::IOWatcher::EV; 1' ? $EV::VERSION : 'not installed';

  # IPv6
  my $ipv6 =
    Mojo::IOLoop::Server::IPV6() ? $IO::Socket::IP::VERSION : 'not installed';

  # TLS
  my $tls =
    Mojo::IOLoop::Server::TLS() ? $IO::Socket::SSL::VERSION : 'not installed';

  # Bonjour
  my $bonjour =
    eval 'Mojo::Server::Daemon::BONJOUR()'
    ? $Net::Rendezvous::Publish::VERSION
    : 'not installed';

  print <<"EOF";
CORE
  Perl        ($], $^O)
  Mojolicious ($Mojolicious::VERSION, $Mojolicious::CODENAME)

OPTIONAL
  EV                       ($ev)
  IO::Socket::IP           ($ipv6)
  IO::Socket::SSL          ($tls)
  Net::Rendezvous::Publish ($bonjour)

$message
EOF
}

1;
__END__

=head1 NAME

Mojolicious::Command::version - Version command

=head1 SYNOPSIS

  use Mojolicious::Command::version;

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

=head1 DESCRIPTION

L<Mojolicious::Command::version> shows versions of installed modules.

=head1 ATTRIBUTES

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

=head2 C<description>

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

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

=head2 C<usage>

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

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

=head1 METHODS

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

=head2 C<run>

  $v->run(@ARGV);

Run this command.

=head1 SEE ALSO

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

=cut