| 1 | # $Id: /local/youri/soft/core/trunk/lib/Youri/Package/RPM/Test.pm 2502 2006-12-02T10:35:40.610312Z guillaume $ | ||
| 2 | package Youri::Repository::Test; | ||
| 3 | |||
| 4 | =head1 NAME | ||
| 5 | |||
| 6 | Youri::Repository::Test - Fake test repository implementation | ||
| 7 | |||
| 8 | =head1 DESCRIPTION | ||
| 9 | |||
| 10 | This is a fake L<Youri::Repository> implementation for, intended for testing | ||
| 11 | purposes. | ||
| 12 | |||
| 13 | =cut | ||
| 14 | |||
| 15 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 1 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | 1 | ▶ | use File::Temp qw/tempdir/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 1 | ▶ | use base 'Youri::Repository'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | 0 | ▶ | sub new { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 22 | 0 | my $class = shift; | |
| 23 | 0 | my %options = ( | |
| 24 | cleanup => 1, | ||
| 25 | perms => 755, | ||
| 26 | package_class => 'Youri::Package::RPM::Test', | ||
| 27 | @_ | ||
| 28 | ); | ||
| 29 | |||
| 30 | 0 | my $dir = tempdir(cleanup => $options{cleanup}); | |
| 31 | 0 | chmod oct($options{perms}), $dir; | |
| 32 | |||
| 33 | 0 | my $self = $class->SUPER::new( | |
| 34 | install_root => $dir, | ||
| 35 | archive_root => $dir, | ||
| 36 | version_root => $dir, | ||
| 37 | ); | ||
| 38 | |||
| 39 | 0 | $self->{_package_class} = $options{package_class}; | |
| 40 | 0 | $self->{_extra_arches} = $options{extra_arches}; | |
| 41 | |||
| 42 | 0 | return $self; | |
| 43 | } | ||
| 44 | |||
| 45 | 0 | ▶ | sub get_install_path { |
|
Subroutine
get_install_path: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 46 | 0 | return ''; | |
| 47 | } | ||
| 48 | |||
| 49 | 0 | ▶ | sub get_archive_path { |
|
Subroutine
get_archive_path: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 50 | 0 | return ''; | |
| 51 | } | ||
| 52 | |||
| 53 | 0 | ▶ | sub get_version_path { |
|
Subroutine
get_version_path: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 54 | 0 | return ''; | |
| 55 | } | ||
| 56 | |||
| 57 | 1 | 1; | |