File: Utility.pm

package info (click to toggle)
libalien-wxwidgets-perl 0.65%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,224 kB
  • ctags: 393
  • sloc: perl: 5,363; sh: 51; makefile: 16
file content (51 lines) | stat: -rw-r--r-- 1,636 bytes parent folder | download | duplicates (9)
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
package My::Build::Utility;

use strict;
use base qw(Exporter);
use Config;
use Fatal qw(open);

our @EXPORT_OK = qw(awx_arch_file awx_install_arch_file
                    awx_install_arch_auto_file
                    awx_arch_dir awx_install_arch_dir awx_touch);

sub awx_arch_file {
    my( $vol, $dir, $file ) = File::Spec->splitpath( $_[0] || '' );
    File::Spec->catfile( 'blib', 'arch', 'Alien', 'wxWidgets',
                         File::Spec->splitdir( $dir ), $file );
}

sub awx_arch_dir {
    my( $vol, $dir, $file ) = File::Spec->splitpath( $_[0] || '' );
    File::Spec->catdir( 'blib', 'arch', 'Alien', 'wxWidgets',
                        File::Spec->splitdir( $dir ), $file );
}

sub awx_install_arch_file {
    my( $build, $p ) = @_;
    my( $vol, $dir, $file ) = File::Spec->splitpath( $p || '' );
    File::Spec->catfile( $build->install_destination( 'arch' ), 'Alien', 'wxWidgets',
                         File::Spec->splitdir( $dir ), $file );
}

sub awx_install_arch_dir {
    my( $build, $p ) = @_;
    my( $vol, $dir, $file ) = File::Spec->splitpath( $p || '' );
    File::Spec->catdir( $build->install_destination( 'arch' ), 'Alien', 'wxWidgets',
                        File::Spec->splitdir( $dir ), $file );
}

sub awx_install_arch_auto_file {
    my( $build, $p ) = @_;
    my( $vol, $dir, $file ) = File::Spec->splitpath( $p || '' );
    File::Spec->catfile( $build->install_destination( 'arch' ), 'auto', 'Alien', 'wxWidgets',
                         File::Spec->splitdir( $dir ), $file );
}

sub awx_touch {
    require ExtUtils::Command;
    local @ARGV = @_;
    ExtUtils::Command::touch();
}

1;