File: MyBuilder.pm

package info (click to toggle)
libwww-form-urlencoded-perl 0.26-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 160 kB
  • sloc: perl: 286; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 641 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package builder::MyBuilder;

use strict;
use warnings;
use base qw(Module::Build);
use File::Spec;
use File::Path;

sub ACTION_code {
    my $self = shift;
    $self->SUPER::ACTION_code();

    return if $ENV{BREAK_BACKWARD_COMPAT};

    my $archdir = File::Spec->catdir($self->blib,'arch','auto','WWW','Form','UrlEncoded','XS');
    File::Path::mkpath($archdir, 0, oct(777)) unless -d $archdir;
    my $keep_arch = File::Spec->catfile($archdir,'.keep');
    open(my $fh,'>',$keep_arch) or die "Couldnot open file for write: $keep_arch, $!";
    print $fh "This file required to install files to archdir for backward compatibility\n";
}

1;