| 1 | package X11::Muralis::Backend::Qiv; | ||||||||||||||||||||
| 2 | 3 | $X11::Muralis::Backend::Qiv::VERSION = '0.1003'; | |||||||||||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 3 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 3 | our @ISA = qw(X11::Muralis::Backend); | |||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | =head1 NAME | ||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | X11::Muralis::Backend:Qiv - use qiv to display images on the desktop. | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | =head1 VERSION | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | version 0.1003 | ||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | =head1 SYNOPSIS | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | muralis --use Qiv | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | =head1 DESCRIPTION | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | This is a backend for muralis which uses the qiv program | ||||||||||||||||||||
| 23 | to display images on the desktop. | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | =cut | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | =head1 METHODS | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | =head2 new | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | =cut | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 34 | 0 | my $class = shift; | |||||||||||||||||||
| 35 | 0 | my %parameters = | |||||||||||||||||||
| 36 | ( | ||||||||||||||||||||
| 37 | prog => 'qiv', | ||||||||||||||||||||
| 38 | can_do => { | ||||||||||||||||||||
| 39 | tile => 1, | ||||||||||||||||||||
| 40 | fullscreen => 1, | ||||||||||||||||||||
| 41 | stretch => 1, | ||||||||||||||||||||
| 42 | centre => 1, | ||||||||||||||||||||
| 43 | }, | ||||||||||||||||||||
| 44 | @_ | ||||||||||||||||||||
| 45 | ); | ||||||||||||||||||||
| 46 | 0 | ▶ | my $self = bless ({%parameters}, ref ($class) || $class); | ||||||||||||||||||
|
Condition0%0/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table0%0/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 47 | 0 | return ($self); | |||||||||||||||||||
| 48 | } # new | ||||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | =head2 display | ||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | $self->display($filename, %args); | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | =cut | ||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | 0 | ▶ | sub display { | ||||||||||||||||||
|
Subroutine
display: not called CC=8 SCAR=42.8
Pod
documented
| |||||||||||||||||||||
| 57 | 0 | my $class = shift; | |||||||||||||||||||
| 58 | 0 | my $filename = shift; | |||||||||||||||||||
| 59 | 0 | my %args = ( | |||||||||||||||||||
| 60 | @_ | ||||||||||||||||||||
| 61 | ); | ||||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | 0 | my $options = ''; | |||||||||||||||||||
| 64 | 0 | ▶ | $options = " --root_t" if $args{tile}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 65 | 0 | ▶ | $options = " -t --bg_color black --maxpect --root" if $args{fullscreen}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 66 | 0 | ▶ | $options = " -t --root_s" if $args{stretch}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 67 | 0 | ▶ | $options = " -t --bg_color black --root" if $args{center}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 68 | 0 | ▶ | $options = " --root_t" if (!$options); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 69 | 0 | ▶ | $options = $args{option} . ' ' . $options if $args{option}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 70 | 0 | my $command = "qiv $options '$filename'"; | |||||||||||||||||||
| 71 | 0 | ▶ | print STDERR $command, "\n" if $args{verbose}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 72 | 0 | system($command); | |||||||||||||||||||
| 73 | } # display | ||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | =head1 REQUIRES | ||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | Test::More | ||||||||||||||||||||
| 78 | |||||||||||||||||||||
| 79 | =head1 INSTALLATION | ||||||||||||||||||||
| 80 | |||||||||||||||||||||
| 81 | To install this module, run the following commands: | ||||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | perl Build.PL | ||||||||||||||||||||
| 84 | ./Build | ||||||||||||||||||||
| 85 | ./Build test | ||||||||||||||||||||
| 86 | ./Build install | ||||||||||||||||||||
| 87 | |||||||||||||||||||||
| 88 | Or, if you're on a platform (like DOS or Windows) that doesn't like the | ||||||||||||||||||||
| 89 | "./" notation, you can do this: | ||||||||||||||||||||
| 90 | |||||||||||||||||||||
| 91 | perl Build.PL | ||||||||||||||||||||
| 92 | perl Build | ||||||||||||||||||||
| 93 | perl Build test | ||||||||||||||||||||
| 94 | perl Build install | ||||||||||||||||||||
| 95 | |||||||||||||||||||||
| 96 | In order to install somewhere other than the default, such as | ||||||||||||||||||||
| 97 | in a directory under your home directory, like "/home/fred/perl" | ||||||||||||||||||||
| 98 | go | ||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | perl Build.PL --install_base /home/fred/perl | ||||||||||||||||||||
| 101 | |||||||||||||||||||||
| 102 | as the first step instead. | ||||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | This will install the files underneath /home/fred/perl. | ||||||||||||||||||||
| 105 | |||||||||||||||||||||
| 106 | You will then need to make sure that you alter the PERL5LIB variable to | ||||||||||||||||||||
| 107 | find the modules, and the PATH variable to find the script. | ||||||||||||||||||||
| 108 | |||||||||||||||||||||
| 109 | Therefore you will need to change: | ||||||||||||||||||||
| 110 | your path, to include /home/fred/perl/script (where the script will be) | ||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | PATH=/home/fred/perl/script:${PATH} | ||||||||||||||||||||
| 113 | |||||||||||||||||||||
| 114 | the PERL5LIB variable to add /home/fred/perl/lib | ||||||||||||||||||||
| 115 | |||||||||||||||||||||
| 116 | PERL5LIB=/home/fred/perl/lib:${PERL5LIB} | ||||||||||||||||||||
| 117 | |||||||||||||||||||||
| 118 | =head1 SEE ALSO | ||||||||||||||||||||
| 119 | |||||||||||||||||||||
| 120 | perl(1). | ||||||||||||||||||||
| 121 | |||||||||||||||||||||
| 122 | =head1 BUGS | ||||||||||||||||||||
| 123 | |||||||||||||||||||||
| 124 | Please report any bugs or feature requests to the author. | ||||||||||||||||||||
| 125 | |||||||||||||||||||||
| 126 | =head1 AUTHOR | ||||||||||||||||||||
| 127 | |||||||||||||||||||||
| 128 | Kathryn Andersen RUBYKAT | ||||||||||||||||||||
| 129 | perlkat AT katspace DOT org | ||||||||||||||||||||
| 130 | www.katspace.org | ||||||||||||||||||||
| 131 | |||||||||||||||||||||
| 132 | =head1 COPYRIGHT AND LICENCE | ||||||||||||||||||||
| 133 | |||||||||||||||||||||
| 134 | Copyright (c) 2008 by Kathryn Andersen | ||||||||||||||||||||
| 135 | |||||||||||||||||||||
| 136 | This program is free software; you can redistribute it and/or modify it | ||||||||||||||||||||
| 137 | under the same terms as Perl itself. | ||||||||||||||||||||
| 138 | |||||||||||||||||||||
| 139 | =cut | ||||||||||||||||||||
| 140 | |||||||||||||||||||||
| 141 | 3 | 1; # End of X11::Muralis::Backend::Qiv | |||||||||||||||||||
| 142 | __END__ | ||||||||||||||||||||