NAME

Zeal::Feed - Class representing a Dash/Zeal documentation feed

SYNOPSIS

  use Zeal::Feed;
  my $feed = Zeal::Feed->new('http://example.com/feed.xml');
  say $feed->version; # 12.2.3
  say $feed->url;     # http://another.example.com/file.tar.gz

  # Download to /home/mgv/docsets/file.docset
  $feed->download('/home/mgv/docsets/');

DESCRIPTION

Dash is an offline API documentation browser. Zeal::Feed is a class representing a Dash/Zeal documentation feed.

A documentation feed is an XML file describing a docset. It contains the version of the docset and one or more URLs to a (typically .tar.gz) archive of the docset.

Available methods:

Zeal::Feed->new($url)

Create a Zeal::Feed object from an HTTP URL.

Zeal::Feed->new_from_file($file)

Create a Zeal::Feed object from a file.

Zeal::Feed->new_from_content($xml)

Create a Zeal::Feed object from a string.

$feed->version

The version of this feed.

$feed->urls

A list of URLs to this docset.

$feed->url

An URL to this docset, randomly chosen from the list returned by urls.

$feed->download($path)

Download and unpack the docset inside the $path directory.

Uses the tar binary for unpacking if availablem, Archive::Tar otherwise. You can set the ZEAL_USE_INTERNAL_TAR environment variable to a true value to force the use of Archive::Tar.

ENVIRONMENT

ZEAL_USE_INTERNAL_TAR

If true, download will always use Archive::Tar.

SEE ALSO

Zeal, http://kapeli.com/dash, http://zealdocs.org

AUTHOR

Marius Gavrilescu, <marius@ieval.ro>

COPYRIGHT AND LICENSE

Copyright (C) 2014-2015 by Marius Gavrilescu

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.20.1 or, at your option, any later version of Perl 5 you may have available.