File: Window.pm

package info (click to toggle)
clusterssh 4.16-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 784 kB
  • sloc: perl: 4,279; sh: 178; makefile: 11
file content (67 lines) | stat: -rw-r--r-- 1,306 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
use strict;
use warnings;

package App::ClusterSSH::Window;

# ABSTRACT: App::ClusterSSH::Window - Base obejct for different types of window module

=head1 DESCRIPTION

Base object to allow for configuring and using different types of windows libraries

=cut

=head1 METHODS

=over 4

=cut

use Carp;

use base qw/ App::ClusterSSH::Base /;

# Module to contain window generic code and pull in specific code from
# an appropriate module

sub import {
    my ($class) = @_;

    # If we are building or in test here, just exit
    # as travis build servers will not have Tk installed
    if ($ENV{AUTHOR_TESTING} || $ENV{RELEASE_TESTING}) {
        print STDERR "skipping initialisation; AUTHOR_TESTING or RELEASE_TESTING are set\n";
        return;
    }

    # Find what windows module we should be using and just overlay it into
    # this object
    my $package_name = __PACKAGE__ . '::Tk';
    ( my $package_path = $package_name ) =~ s{::}{/}g;
    require "$package_path.pm";
    $package_name->import();

    {
        no strict 'refs';
        push @{ __PACKAGE__ . '::ISA' }, $package_name;
    }
}

my %servers;

=item $obj = App::ClusterSSH::Window->new({});

Creates object

=back

=cut

sub new {
    my ( $class, %args ) = @_;
    my $self = $class->SUPER::new(%args);

    return $self;
}

1;