NAME

RT::ClientX::GrabBugs - download bugs from an RT queue and dump them as RDF

SYNOPSIS

RT::ClientX::GrabBugs
  ->new({
    user      => $rt_username,
    pass      => $rt_password,
    queue     => $rt_queue,
    dest      => './output_file.ttl',
    })
  ->process;

DESCRIPTION

This module downloads bugs from an RT queue and dumps them as RDF.

Constructor

new(%attrs)

Fairly standard Moosey new constructor, accepting a hash of named parameters.

main(@argv)

Alternative constructor. Processes @argv like command-line arguments. e.g.

RT::ClientX::GrabBugs->main('--user=foo', '--pass=bar',
                            '--queue=My-Module');

This constructor uses Getopt::ArgvFile to read additional options from ~/.rt-grabbugs and ./.rt-grabbugs.

The constructor supports the options "--user", "--pass", "--queue" and "--dest".

Attributes

  • server, user, pass

    Details for logging into RT.

  • dest

    The file name where you want to save the data. This defaults to "./meta/rt-bugs.ttl".

  • queue

    Queue to grab bugs for. Assuming that you're grabbing from rt.cpan.org, this corresponds to a CPAN distribution (e.g. "RT-ClientX-GrabBugs").

    If not provided, this module will try to guess which queue you want. It does this by looking for a file called "dist.ini" in the project directory. Within this file, it looks for a line with the following format:

    ;; name="Foo-Bar"

    This type of line is commonly found in dist.ini files designed for Dist::Inkt. If you're using Dist::Zilla it should be possible to add such a line without breaking anything. (Dist::Zilla sees lines beginning with a semicolon as comments.)

  • project_uri

    URI to use for doap:Project in output.

  • queue_model

    An RDF::Trine::Model generated by calling the add_to_model method on each bug in the queue_table list. Here you probably want to rely on the default model that the class builds.

Methods

  • process

    Saves the model from queue_model to the destination dest as Turtle.

    Returns $self.

BUGS

Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=RT-ClientX-GrabBugs.

SEE ALSO

RDF::DOAP.

AUTHOR

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE

This software is copyright (c) 2012, 2014 by Toby Inkster.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

DISCLAIMER OF WARRANTIES

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.