File: MyInstallGuide.pm

package info (click to toggle)
libfile-libmagic-perl 1.02-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 524 kB
  • ctags: 849
  • sloc: perl: 1,616; pascal: 88; ansic: 54; makefile: 13
file content (85 lines) | stat: -rw-r--r-- 1,743 bytes parent folder | download
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
package inc::MyInstallGuide;

use Dist::Zilla::File::FromCode;
use Moose;
use Moose::Autobox;

use namespace::autoclean;

with 'Dist::Zilla::Role::FileGatherer';
with 'Dist::Zilla::Role::TextTemplate';

my $content = <<'EOF';
# Installing File-LibMagic

Installing File-LibMagic requires that you have the *libmagic.so* library and
the *magic.h* header file installed. Once those are installed, this module is
installed like any other Perl distributions.

## Installing libmagic

On Debian/Ubuntu run:

    sudo apt-get install libmagic-dev

On Mac you can use homebrew (http://brew.sh/):

    brew install libmagic

## Installation with cpanm

If you have cpanm, you only need one line:

    % cpanm File::LibMagic

If you are installing into a system-wide directory, you may need to pass the
"-S" flag to cpanm, which uses sudo to install the module:

    % cpanm -S File::LibMagic

## Installing with the CPAN shell

Alternatively, if your CPAN shell is set up, you should just be able to do:

    % cpan File::LibMagic

## Manual installation

As a last resort, you can manually install it. Download the tarball, untar it,
then build it:

    % perl Makefile.PL
    % make && make test

Then install it:

    % make install

If you are installing into a system-wide directory, you may need to run:

    % sudo make install

## Documentation

File-LibMagic documentation is available as POD.
You can run perldoc from a shell to read the documentation:

    % perldoc File::LibMagic
EOF

sub gather_files {
    my $self = shift;

    $self->add_file(
        Dist::Zilla::File::FromCode->new(
            name => 'INSTALL.md',
            code => sub { $content },
        )
    );

    return;
}

__PACKAGE__->meta()->make_immutable();

1;