Net::Redmine - A mechanized-based programming API against redmine server.
use Net::Redmine; my $r = Net::Redmine->new( url => $server, user => $user, password => $password ); # Create a new ticket my $t1 = $r->create( ticket => { subject => "bug in the bag!", description => "please eliminate the bug for me", } ); # Load an existing one. my $t2 = $r->lookup( ticket => { id => 42 } ); # copy a ticket my $t3 = $r->copy ( ticket => { id => 42, # id of the original ticket we want to copy subject => "new subject", description => "a description", } );
Net::Redmine is an mechanized-based programming API against redmine server.
Constructor. You need to construct a Net::Redmine object before you can do anything. The parameters to this function is a list of key-value pairs. All of these 3 pairs are required.
Net::Redmine
The url should points to a project url. Like http://example.org/projects/foo. It's the one that points you to the project overview tab.
url
The user and the password are the login credentials to login this project.
Notice: One Net::Redmine object can only handles one project on a redmine server. You should create multiple Net::Redmine objects if you're trying to manipulate multiple project at the same program.
The create instance method can create tickets. In the future releases it could also be used to create other kinds of assets.
create
The value to the ticket key is a HashRef that should at least contain subject and <description> of the ticket. For example:
ticket
subject
my $t = $r->create(ticket => { subject => "Got a bug", description => "Found a bug in the bag" });
The returned value of this method is a Net::Redmine::Ticket object. Also read the document of that class to see how to use it.
Net::Redmine::Ticket
The copy instance method can copy an existing ticket. The id is the id of the original ticket we want to copy. The other values to the ticket key is the same hasref as for create.
copy
Given a ticket id, this instance method load the ticket content from the server, it also returns a Net::Redmine::Ticket object.
At this point, only id can be specified.
id
Kang-min Liu <gugod@gugod.org>
http://redmine.org, Net::Trac
Copyright (c) 2009, Kang-min Liu <gugod@gugod.org>.
<gugod@gugod.org>
This is free software, licensed under:
The MIT (X11) License
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install Net::Redmine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Redmine
CPAN shell
perl -MCPAN -e shell install Net::Redmine
For more information on module installation, please visit the detailed CPAN module installation guide.