1Test::AutoBuild::PlatfoUrsme(r3)Contributed Perl DocumenTteastti:o:nAutoBuild::Platform(3)
2
3
4

NAME

6       Test::AutoBuild::Platform - represents a build host's environment
7

SYNOPSIS

9         use Test::AutoBuild::Platform;
10
11         # Create a new platform based on the host machine's native
12         # environment
13         my $platform = Test::AutoBuild::Platform->new(name => "host");
14
15
16         # Or create a platform describing a chroot environment which
17         # has a differing OS, but same architecture
18         my $platform = Test::AutoBuild::Platform->new(name => "host",
19                                                       label => "Fedora Core 3");
20
21         # Or create a platform describing an emulated OS
22         my $platform = Test::AutoBuild::Platform->new(name => "host",
23                                                       label => "Free BSD",
24                                                       operating_system => "bsd",
25                                                       architecture => "x86_64");
26
27         # Create a platform describing the host, with some 'interesting'
28         # extra metadata about the toolchain
29         my $platform = Test::AutoBuild::Platform->new(name => "host",
30                                                       options => {
31                 'compiler.cc' => "GCC 3.2.3",
32                 'compiler.c++' => "G++ 3.2.3",
33                 'linker' => "GNU LD 2.15",
34               });
35

METHODS

37       my $stage = Test::AutoBuild::Platform->new(name => $name, [label =>
38       $label,]); [architecture => $arch,]); [operating_system => $os,]
39       [options => \%options]);
40           Creates a new platform object describing a build root environment.
41           The "name" parameter is a short tag for the platform. The optional
42           "label" parameter is a free text descriptive title for the
43           platform, typically the OS distribution name.  If omitted, the
44           first line of /etc/issue will be used. The "architecture" parameter
45           is the formal machine architecture, defaulting to the 'machine'
46           field from the uname(2) system call. The "operating_system"
47           parameter is the formal operating system name, defaulting to the
48           'sysname' field from the uname(2) system call.  The optional
49           "options" parameter is a hash reference containing arbitrary
50           deployment specific metadata about the platform.
51
52       $value = $platform->option($name[, $newvalue]);
53           Retrieves a custom option describing a custom aspect of the build
54           host platform, identified as interesting by the administrator.  If
55           the $newvalue parameter is supplied, then the configuration option
56           is updated.
57
58       my @names = $platform->options;
59           Return a list of all custom options set against this platform. The
60           names returned can be used in calling the "option" method to lookup
61           a value.
62

AUTHORS

64       Daniel Berrange <dan@berrange.com>, Dennis Gregorovic
65       <dgregorovic@alum.mit.edu>
66
68       Copyright (C) 2005 Daniel Berrange
69

SEE ALSO

71       perl(1), Test::AutoBuild, Test::AutoBuild::Runtime
72
73
74
75perl v5.12.1                      2007-12-08      Test::AutoBuild::Platform(3)
Impressum