summaryrefslogtreecommitdiffstats
path: root/urpm/xml_info_pkg.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-31 16:45:16 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-31 16:45:16 +0000
commitd90e2c33fec88adabef87549ec3d1b4fb65d9587 (patch)
treed52440e9b830446ca5560a2533cf00850ef3804d /urpm/xml_info_pkg.pm
parent3cd85172bf689b679e8c1fc626690ba87b136d74 (diff)
downloadurpmi-d90e2c33fec88adabef87549ec3d1b4fb65d9587.tar
urpmi-d90e2c33fec88adabef87549ec3d1b4fb65d9587.tar.gz
urpmi-d90e2c33fec88adabef87549ec3d1b4fb65d9587.tar.bz2
urpmi-d90e2c33fec88adabef87549ec3d1b4fb65d9587.tar.xz
urpmi-d90e2c33fec88adabef87549ec3d1b4fb65d9587.zip
convert a couple comments to POD
Diffstat (limited to 'urpm/xml_info_pkg.pm')
-rw-r--r--urpm/xml_info_pkg.pm59
1 files changed, 54 insertions, 5 deletions
diff --git a/urpm/xml_info_pkg.pm b/urpm/xml_info_pkg.pm
index d75bd2ce..889bfabd 100644
--- a/urpm/xml_info_pkg.pm
+++ b/urpm/xml_info_pkg.pm
@@ -12,9 +12,12 @@ urpm::xml_info_pkg - XML Package data retrieving related routines for urpmi
=over
-=cut
+=item new($class, $hash, $pkg)
-# proxy object: returns the xml info if available, otherwise redirects to URPM::Package
+Returns a proxy object
+It enable to get the XML info if available, otherwise redirects to URPM::Package
+
+=cut
sub new {
my ($class, $hash, $pkg) = @_;
@@ -25,7 +28,23 @@ sub new {
}
-# only available in synthesis/hdlist
+=item id($pkg)
+
+=item group($pkg)
+
+=item size($pkg)
+
+=item epoch($pkg)
+
+=item buildhost($pkg)
+
+=item packager($pkg)
+
+=item summary($pkg)
+
+Only available in synthesis/hdlist
+=cut
+
sub id { $_[0]{pkg}->id }
sub group { $_[0]{pkg}->group }
sub size { $_[0]{pkg}->size }
@@ -35,7 +54,22 @@ sub packager { $_[0]{pkg}->packager }
sub summary { $_[0]{pkg}->summary }
-# can be directly available in xml_info
+=item url($pkg)
+
+=item license($pkg)
+
+=item sourcerpm($pkg)
+
+=item description($pkg)
+
+=item changelogs($pkg)
+
+=item files($pkg)
+
+Can be directly available in xml_info
+
+=cut
+
sub url { exists $_[0]{url} ? $_[0]{url} : $_[0]{pkg}->url }
sub license { exists $_[0]{license} ? $_[0]{license} : $_[0]{pkg}->license }
sub sourcerpm { exists $_[0]{sourcerpm} ? $_[0]{sourcerpm} : $_[0]{pkg}->sourcerpm }
@@ -47,7 +81,22 @@ sub files { exists $_[0]{files} ? split("\n", $_[0]{files}) : $_[0]{pkg}->files
my $fullname_re = qr/^(.*)-([^\-]*)-([^\-]*)\.([^\.\-]*)$/;
-# available in both {pkg} and {fn}
+=item name($pkg)
+
+=item version($pkg)
+
+=item release($pkg)
+
+=item arch($pkg)
+
+=item fullname($pkg)
+
+=item filename($pkg)
+
+Available in both {pkg} and {fn}
+
+=cut
+
sub name { exists $_[0]{pkg} ? $_[0]{pkg}->name : $_[0]{fn} =~ $fullname_re && $1 }
sub version { exists $_[0]{pkg} ? $_[0]{pkg}->version : $_[0]{fn} =~ $fullname_re && $2 }
sub release { exists $_[0]{pkg} ? $_[0]{pkg}->release : $_[0]{fn} =~ $fullname_re && $3 }