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
user
,pass
Username and password 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 subdirectory called "meta" in the current directory; loading all the RDF in "meta"; and figuring out the doap:Project resource which is best described. The heuristics work perfectly well for me, but unless you package your distributions exactly like I do, they're unlikely to work well for you. In which case, you should avoid this default behaviour.
queue_table
An arrayref of RT::ClientX::GrabBugs::Bug (see
bug_class
) objects representing all the bugs from a project.By default, this module will build this by logging into RT and downloading it. Here, you probably want to rely on the default behaviour, because that's the whole point of using the module.
queue_model
An RDF::Trine::Model generated by calling the
add_to_model
method on each bug in thequeue_table
list. Again, here you probably want to rely on the default.bug_class
A class to bless bugs into, defaults to RT::ClientX::GrabBugs::Bug.
Methods
process
Saves the model from
queue_model
to the destinationdest
as Turtle.Returns
$self
.rdf_metadata
,rdf_project_uri
Methods borrowed from Module::Install::Admin::RDF.
BUGS
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=RT-ClientX-GrabBugs.
SEE ALSO
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT AND LICENCE
This software is copyright (c) 2012 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.