FreeBSD::Pkgs::FindUpdates - Finds updates for FreeBSD pkgs by checking the ports index.
Version 0.3.0
This does use FreeBSD::Ports::INDEXhash. Thus if you want to specifiy the location of the index file, you will want to see the supported methodes for it in that module.
use FreeBSD::Pkgs::FindUpdates; #initiates the module my $pkgsupdate = FreeBSD::Pkgs::FindUpdates->new; #finds changes my %changes=$pkgsupdate->find; #prints the upgraded stuff while(my ($name, $pkg) = each %{$changes{upgrade}}){ print $name.' updated from "'. $pkg->{oldversion}.'" to "'. $pkg->{newversion}."\"\n"; } #prints the downgraded stuff while(my ($name, $pkg) = each %{$changes{upgrade}}){ print $name.' updated from "'. $pkg->{oldversion}.'" to "'. $pkg->{newversion}."\"\n"; }
This initiate the module.
This finds any changes creates a hash.
Two arguements are optionally accepted. The first is a hash returned from INDEXhash
#basic usage... my %changes=$pkgsupdate->find; #create the INDEXhash and pkgdb and then pass it my $pkgdb=FreeBSD::Pkgs->new; $pkgdb->parseInstalled; if ( $pkgdb->error ){ warn('Error: FreeBSD::Pkgs->new errored'); } my %index=INDEXhash; my %changes=$pkgsupdate->find(\%index, $pkgdb); if ( $pkgsupdate->error ){ warn('Error:'.$pkgsupdate->error.': '.$pkgsupdate->errorString); }
This hash contains several keys that are listed below. Each is a hash that contain several keys of their own. Please see the sub hash section for information on that.
The name of the installed package is used as the primary key in each.
This is a hash that contains a list of packages to be down graded.
The keys to this hash are the packages that will be change from. The values are the names that it will changed to.
This is a hash that contains a list of packages to be up graded.
This means there is no change.
The keys to this hash are the packages that will be change to. The values are the names that it will changed from.
All three keys contain hashes that then contian these values.
This is the name of the currently installed package.
This is the name of what it will be changed to if upgraded/downgraded.
This is the old version.
This is the version ofwhat it will be changed toif upgraded/downgraded.
This is the port that provides it.
Error handling is provided by Error::Helper.
FreeBSD::Pkgs errored.
Zane C. Bowers-Hadley, <vvelox at vvelox.net>
<vvelox at vvelox.net>
Please report any bugs or feature requests to bug-freebsd-pkgs-findupdates at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=FreeBSD-Pkgs-FindUpdates. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-freebsd-pkgs-findupdates at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc FreeBSD::Pkgs::FindUpdates
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=FreeBSD-Pkgs-FindUpdates
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/FreeBSD-Pkgs-FindUpdates
CPAN Ratings
http://cpanratings.perl.org/d/FreeBSD-Pkgs-FindUpdates
Search CPAN
http://search.cpan.org/dist/FreeBSD-Pkgs-FindUpdates
Copyright 2012 Zane C. Bowers-Hadley, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install FreeBSD::Pkgs::FindUpdates, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FreeBSD::Pkgs::FindUpdates
CPAN shell
perl -MCPAN -e shell install FreeBSD::Pkgs::FindUpdates
For more information on module installation, please visit the detailed CPAN module installation guide.