Browse Source

v5 - better POD, require perl 5.10

George S. Baugh 11 years ago
parent
commit
8c3ca5b243
3 changed files with 70 additions and 243 deletions
  1. 2 0
      Makefile.PL
  2. BIN
      dist/TestRail-API-0.005.tar.gz
  3. 68 243
      lib/TestRail/API.pm

+ 2 - 0
Makefile.PL

@@ -1,8 +1,10 @@
+use 5.010; #Perl 5.10 minimum due to usage of undef or (//)
 use ExtUtils::MakeMaker;
 use ExtUtils::MakeMaker;
 
 
 WriteMakefile(
 WriteMakefile(
     NAME              => "TestRail::API",
     NAME              => "TestRail::API",
     VERSION_FROM      => "lib/TestRail/API.pm",
     VERSION_FROM      => "lib/TestRail/API.pm",
+    MIN_PERL_VERSION  => '5.010',
     TEST_REQUIRES     => {
     TEST_REQUIRES     => {
         "Test::More"      => 0,
         "Test::More"      => 0,
         "Scalar::Util"    => 0,
         "Scalar::Util"    => 0,

BIN
dist/TestRail-API-0.005.tar.gz


+ 68 - 243
lib/TestRail/API.pm

@@ -1,11 +1,11 @@
 package TestRail::API;
 package TestRail::API;
 {
 {
-    $TestRail::API::VERSION = '0.004';
+    $TestRail::API::VERSION = '0.005';
 }
 }
 
 
 =head1 NAME
 =head1 NAME
 
 
-TestLink::API - Provides an interface to TestLink's XMLRPC api via HTTP
+TestRail::API - Provides an interface to TestRail's REST api via HTTP
 
 
 =head1 SYNOPSIS
 =head1 SYNOPSIS
 
 
@@ -34,21 +34,19 @@ use LWP::UserAgent;
 
 
 =head1 CONSTRUCTOR
 =head1 CONSTRUCTOR
 
 
-=over 4
-
-=item B<new (api_url, user, password)>
+=head2 B<new (api_url, user, password)>
 
 
 Creates new C<TestRail::API> object.
 Creates new C<TestRail::API> object.
 
 
 =over 4
 =over 4
 
 
-=item C<API URL> - base url for your TestRail api server.
+=item STRING C<API URL> - base url for your TestRail api server.
 
 
-=item C<USER> - Your testRail User.
+=item STRING C<USER> - Your testRail User.
 
 
-=item C<PASSWORD> - Your TestRail password.
+=item STRING C<PASSWORD> - Your TestRail password.
 
 
-=item C<DEBUG> - Print the JSON responses from TL with your requests.
+=item BOOLEAN C<DEBUG> - Print the JSON responses from TL with your requests.
 
 
 =back
 =back
 
 
@@ -56,8 +54,6 @@ Returns C<TestRail::API> object if login is successful.
 
 
     my $tr = TestRail::API->new('http://tr.test/testrail', 'moo','M000000!');
     my $tr = TestRail::API->new('http://tr.test/testrail', 'moo','M000000!');
 
 
-=back
-
 =cut
 =cut
 
 
 sub new {
 sub new {
@@ -139,15 +135,11 @@ sub _doRequest {
 
 
 =head1 USER METHODS
 =head1 USER METHODS
 
 
-=over 4
-
-=item B<getUsers ()>
+=head2 B<getUsers ()>
 
 
 Get all the user definitions for the provided Test Rail install.
 Get all the user definitions for the provided Test Rail install.
 Returns ARRAYREF of user definition HASHREFs.
 Returns ARRAYREF of user definition HASHREFs.
 
 
-=back
-
 =cut
 =cut
 
 
 sub getUsers {
 sub getUsers {
@@ -156,19 +148,15 @@ sub getUsers {
     return $self->{'user_cache'};
     return $self->{'user_cache'};
 }
 }
 
 
-=over 4
-
-=item B<getUserByID(id)>
+=head2 B<getUserByID(id)>
 =cut
 =cut
-=item B<getUserByName(name)>
+=head2 B<getUserByName(name)>
 =cut
 =cut
-=item B<getUserByEmail(email)>
+=head2 B<getUserByEmail(email)>
 
 
 Get user definition hash by ID, Name or Email.
 Get user definition hash by ID, Name or Email.
 Returns user def HASHREF.
 Returns user def HASHREF.
 
 
-=back
-
 =cut
 =cut
 
 
 
 
@@ -203,9 +191,7 @@ sub getUserByEmail {
 
 
 =head1 PROJECT METHODS
 =head1 PROJECT METHODS
 
 
-=over 4
-
-=item B<createProject (name, [description,send_announcement])>
+=head2 B<createProject (name, [description,send_announcement])>
 
 
 Creates new Project (Database of testsuites/tests).
 Creates new Project (Database of testsuites/tests).
 Optionally specify an announcement to go out to the users.
 Optionally specify an announcement to go out to the users.
@@ -225,8 +211,6 @@ Returns project definition HASHREF on success, false otherwise.
 
 
     $tl->createProject('Widgetronic 4000', 'Tests for the whiz-bang new product', true);
     $tl->createProject('Widgetronic 4000', 'Tests for the whiz-bang new product', true);
 
 
-=back
-
 =cut
 =cut
 
 
 sub createProject {
 sub createProject {
@@ -245,9 +229,7 @@ sub createProject {
 
 
 }
 }
 
 
-=over 4
-
-=item B<deleteProjectByID (id)>
+=head2 B<deleteProjectByID (id)>
 
 
 Deletes specified project by ID.
 Deletes specified project by ID.
 Requires TestRail admin login.
 Requires TestRail admin login.
@@ -262,8 +244,6 @@ Returns BOOLEAN.
 
 
     $success = $tl->deleteProject(1);
     $success = $tl->deleteProject(1);
 
 
-=back
-
 =cut
 =cut
 
 
 sub deleteProject {
 sub deleteProject {
@@ -272,9 +252,7 @@ sub deleteProject {
     return $result;
     return $result;
 }
 }
 
 
-=over 4
-
-=item B<getProjects ()>
+=head2 B<getProjects ()>
 
 
 Get all available projects
 Get all available projects
 
 
@@ -282,8 +260,6 @@ Returns array of project definition HASHREFs, false otherwise.
 
 
     $projects = $tl->getProjects;
     $projects = $tl->getProjects;
 
 
-=back
-
 =cut
 =cut
 
 
 sub getProjects {
 sub getProjects {
@@ -306,9 +282,7 @@ sub getProjects {
     return $result;
     return $result;
 }
 }
 
 
-=over 4
-
-=item B<getProjectByName ($project)>
+=head2 B<getProjectByName ($project)>
 
 
 Gets some project definition hash by it's name
 Gets some project definition hash by it's name
 
 
@@ -322,8 +296,6 @@ Returns desired project def HASHREF, false otherwise.
 
 
     $projects = $tl->getProjectByName('FunProject');
     $projects = $tl->getProjectByName('FunProject');
 
 
-=back
-
 =cut
 =cut
 
 
 sub getProjectByName {
 sub getProjectByName {
@@ -342,9 +314,7 @@ sub getProjectByName {
     return 0;
     return 0;
 }
 }
 
 
-=over 4
-
-=item B<getProjectByID ($project)>
+=head2 B<getProjectByID ($project)>
 
 
 Gets some project definition hash by it's ID
 Gets some project definition hash by it's ID
 
 
@@ -358,8 +328,6 @@ Returns desired project def HASHREF, false otherwise.
 
 
     $projects = $tl->getProjectByID(222);
     $projects = $tl->getProjectByID(222);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getProjectByID {
 sub getProjectByID {
@@ -379,9 +347,7 @@ sub getProjectByID {
 }
 }
 =head1 TESTSUITE METHODS
 =head1 TESTSUITE METHODS
 
 
-=over 4
-
-=item B<createTestSuite (project_id, name, [description])>
+=head2 B<createTestSuite (project_id, name, [description])>
 
 
 Creates new TestSuite (folder of tests) in the database of test specifications under given project id having given name and details.
 Creates new TestSuite (folder of tests) in the database of test specifications under given project id having given name and details.
 
 
@@ -399,8 +365,6 @@ Returns TS definition HASHREF on success, false otherwise.
 
 
     $tl->createTestSuite(1, 'broken tests', 'Tests that should be reviewed');
     $tl->createTestSuite(1, 'broken tests', 'Tests that should be reviewed');
 
 
-=back
-
 =cut
 =cut
 
 
 sub createTestSuite {
 sub createTestSuite {
@@ -416,9 +380,8 @@ sub createTestSuite {
     return $result;
     return $result;
 
 
 }
 }
-=over 4
 
 
-=item B<deleteTestSuite (suite_id)>
+=head2 B<deleteTestSuite (suite_id)>
 
 
 Deletes specified testsuite.
 Deletes specified testsuite.
 
 
@@ -432,8 +395,6 @@ Returns BOOLEAN.
 
 
     $tl->deleteTestSuite(1);
     $tl->deleteTestSuite(1);
 
 
-=back
-
 =cut
 =cut
 
 
 sub deleteTestSuite {
 sub deleteTestSuite {
@@ -444,9 +405,7 @@ sub deleteTestSuite {
 
 
 }
 }
 
 
-=over 4
-
-=item B<getTestSuites (project_id,get_tests)>
+=head2 B<getTestSuites (project_id)>
 
 
 Gets the testsuites for a project
 Gets the testsuites for a project
 
 
@@ -460,8 +419,6 @@ Returns ARRAYREF of testsuite definition HASHREFs, 0 on error.
 
 
     $suites = $tl->getTestSuites(123);
     $suites = $tl->getTestSuites(123);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getTestSuites {
 sub getTestSuites {
@@ -469,9 +426,7 @@ sub getTestSuites {
     return $self->_doRequest('index.php?/api/v2/get_suites/'.$proj);
     return $self->_doRequest('index.php?/api/v2/get_suites/'.$proj);
 }
 }
 
 
-=over 4
-
-=item B<getTestSuiteByName (project_id,testsuite_name)>
+=head2 B<getTestSuiteByName (project_id,testsuite_name)>
 
 
 Gets the testsuite that matches the given name inside of given project.
 Gets the testsuite that matches the given name inside of given project.
 
 
@@ -487,8 +442,6 @@ Returns desired testsuite definition HASHREF, false otherwise.
 
 
     $suites = $tl->getTestSuitesByName(321, 'hugSuite');
     $suites = $tl->getTestSuitesByName(321, 'hugSuite');
 
 
-=back
-
 =cut
 =cut
 
 
 sub getTestSuiteByName {
 sub getTestSuiteByName {
@@ -504,9 +457,7 @@ sub getTestSuiteByName {
     return 0; #Couldn't find it
     return 0; #Couldn't find it
 }
 }
 
 
-=over 4
-
-=item B<getTestSuiteByID (testsuite_id)>
+=head2 B<getTestSuiteByID (testsuite_id)>
 
 
 Gets the testsuite with the given ID.
 Gets the testsuite with the given ID.
 
 
@@ -520,8 +471,6 @@ Returns desired testsuite definition HASHREF, false otherwise.
 
 
     $tests = $tl->getTestSuiteByID(123);
     $tests = $tl->getTestSuiteByID(123);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getTestSuiteByID {
 sub getTestSuiteByID {
@@ -533,9 +482,7 @@ sub getTestSuiteByID {
 
 
 =head1 SECTION METHODS
 =head1 SECTION METHODS
 
 
-=over 4
-
-=item B<createSection(project_id,suite_id,name,[parent_id])>
+=head2 B<createSection(project_id,suite_id,name,[parent_id])>
 
 
 Creates a section.
 Creates a section.
 
 
@@ -555,7 +502,6 @@ Returns new section definition HASHREF, false otherwise.
 
 
     $section = $tr->createSection(1,1,'nugs',1);
     $section = $tr->createSection(1,1,'nugs',1);
 
 
-=back
 =cut
 =cut
 
 
 sub createSection {
 sub createSection {
@@ -572,9 +518,7 @@ sub createSection {
 
 
 }
 }
 
 
-=over 4
-
-=item B<deleteSection (section_id)>
+=head2 B<deleteSection (section_id)>
 
 
 Deletes specified section.
 Deletes specified section.
 
 
@@ -588,8 +532,6 @@ Returns BOOLEAN.
 
 
     $tr->deleteSection(1);
     $tr->deleteSection(1);
 
 
-=back
-
 =cut
 =cut
 
 
 sub deleteSection {
 sub deleteSection {
@@ -600,9 +542,7 @@ sub deleteSection {
 
 
 }
 }
 
 
-=over 4
-
-=item B<getSections (project_id,suite_id)>
+=head2 B<getSections (project_id,suite_id)>
 
 
 Gets sections for a given project and suite.
 Gets sections for a given project and suite.
 
 
@@ -618,8 +558,6 @@ Returns ARRAYREF of section definition HASHREFs.
 
 
     $tr->getSections(1,2);
     $tr->getSections(1,2);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getSections {
 sub getSections {
@@ -627,9 +565,7 @@ sub getSections {
     return $self->_doRequest("index.php?/api/v2/get_sections/$project_id&suite_id=$suite_id");
     return $self->_doRequest("index.php?/api/v2/get_sections/$project_id&suite_id=$suite_id");
 }
 }
 
 
-=over 4
-
-=item B<getSectionByID (section_id)>
+=head2 B<getSectionByID (section_id)>
 
 
 Gets desired section.
 Gets desired section.
 
 
@@ -645,8 +581,6 @@ Returns section definition HASHREF.
 
 
     $tr->getSectionByID(344);
     $tr->getSectionByID(344);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getSectionByID {
 sub getSectionByID {
@@ -654,9 +588,7 @@ sub getSectionByID {
     return $self->_doRequest("index.php?/api/v2/get_section/$section_id");
     return $self->_doRequest("index.php?/api/v2/get_section/$section_id");
 }
 }
 
 
-=over 4
-
-=item B<getSectionByName (project_id,suite_id,name)>
+=head2 B<getSectionByName (project_id,suite_id,name)>
 
 
 Gets desired section.
 Gets desired section.
 
 
@@ -674,8 +606,6 @@ Returns section definition HASHREF.
 
 
     $tr->getSectionByName(1,2,'nugs');
     $tr->getSectionByName(1,2,'nugs');
 
 
-=back
-
 =cut
 =cut
 
 
 sub getSectionByName {
 sub getSectionByName {
@@ -689,9 +619,7 @@ sub getSectionByName {
 
 
 =head1 CASE METHODS
 =head1 CASE METHODS
 
 
-=over 4
-
-=item B<getCaseTypes ()>
+=head2 B<getCaseTypes ()>
 
 
 Gets possible case types.
 Gets possible case types.
 
 
@@ -699,8 +627,6 @@ Returns ARRAYREF of case type definition HASHREFs.
 
 
     $tr->getCaseTypes();
     $tr->getCaseTypes();
 
 
-=back
-
 =cut
 =cut
 
 
 sub getCaseTypes {
 sub getCaseTypes {
@@ -709,20 +635,20 @@ sub getCaseTypes {
     return $self->{'type_cache'};
     return $self->{'type_cache'};
 }
 }
 
 
-=over 4
-
-=item B<getCaseTypeByName (name)>
+=head2 B<getCaseTypeByName (name)>
 
 
 Gets case type by name.
 Gets case type by name.
 
 
-=item C<NAME> STRING - Name of desired case type
+=over 4
+
+=item STRING C<NAME> - Name of desired case type
+
+=back
 
 
 Returns case type definition HASHREF.
 Returns case type definition HASHREF.
 
 
     $tr->getCaseTypeByName();
     $tr->getCaseTypeByName();
 
 
-=back
-
 =cut
 =cut
 
 
 sub getCaseTypeByName {
 sub getCaseTypeByName {
@@ -735,9 +661,7 @@ sub getCaseTypeByName {
     return 0;
     return 0;
 }
 }
 
 
-=over 4
-
-=item B<createCase(section_id,title,type_id,options,extra_options)>
+=head2 B<createCase(section_id,title,type_id,options,extra_options)>
 
 
 Creates a test case.
 Creates a test case.
 
 
@@ -772,8 +696,6 @@ Returns new case definition HASHREF, false otherwise.
 
 
     $case = $tr->createCase(1,'Do some stuff',3,$custom_opts,$other_opts);
     $case = $tr->createCase(1,'Do some stuff',3,$custom_opts,$other_opts);
 
 
-=back
-
 =cut
 =cut
 
 
 sub createCase {
 sub createCase {
@@ -803,9 +725,7 @@ sub createCase {
     return $result;
     return $result;
 }
 }
 
 
-=over 4
-
-=item B<deleteCase (case_id)>
+=head2 B<deleteCase (case_id)>
 
 
 Deletes specified section.
 Deletes specified section.
 
 
@@ -819,8 +739,6 @@ Returns BOOLEAN.
 
 
     $tr->deleteCase(1324);
     $tr->deleteCase(1324);
 
 
-=back
-
 =cut
 =cut
 
 
 sub deleteCase {
 sub deleteCase {
@@ -829,9 +747,7 @@ sub deleteCase {
     return $result;
     return $result;
 }
 }
 
 
-=over 4
-
-=item B<getCases (project_id,suite_id,section_id)>
+=head2 B<getCases (project_id,suite_id,section_id)>
 
 
 Gets cases for provided section.
 Gets cases for provided section.
 
 
@@ -849,8 +765,6 @@ Returns ARRAYREF of test case definition HASHREFs.
 
 
     $tr->getCases(1,2,3);
     $tr->getCases(1,2,3);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getCases {
 sub getCases {
@@ -860,9 +774,7 @@ sub getCases {
     return $self->_doRequest($url);
     return $self->_doRequest($url);
 }
 }
 
 
-=over 4
-
-=item B<getCaseByName (project_id,suite_id,section_id,name)>
+=head2 B<getCaseByName (project_id,suite_id,section_id,name)>
 
 
 Gets case by name.
 Gets case by name.
 
 
@@ -882,8 +794,6 @@ Returns test case definition HASHREF.
 
 
     $tr->getCaseByName(1,2,3,'nugs');
     $tr->getCaseByName(1,2,3,'nugs');
 
 
-=back
-
 =cut
 =cut
 
 
 sub getCaseByName {
 sub getCaseByName {
@@ -895,9 +805,7 @@ sub getCaseByName {
     return 0;
     return 0;
 }
 }
 
 
-=over 4
-
-=item B<getCaseByID (case_id)>
+=head2 B<getCaseByID (case_id)>
 
 
 Gets case by ID.
 Gets case by ID.
 
 
@@ -911,8 +819,6 @@ Returns test case definition HASHREF.
 
 
     $tr->getCaseByID(1345);
     $tr->getCaseByID(1345);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getCaseByID {
 sub getCaseByID {
@@ -922,9 +828,7 @@ sub getCaseByID {
 
 
 =head1 RUN METHODS
 =head1 RUN METHODS
 
 
-=over 4
-
-=item B<createRun (project_id)>
+=head2 B<createRun (project_id)>
 
 
 Create a run.
 Create a run.
 
 
@@ -950,8 +854,6 @@ Returns run definition HASHREF.
 
 
     $tr->createRun(1,1345,'RUN AWAY','SO FAR AWAY',22,3,[3,4,5,6]);
     $tr->createRun(1,1345,'RUN AWAY','SO FAR AWAY',22,3,[3,4,5,6]);
 
 
-=back
-
 =cut
 =cut
 
 
 #If you pass an array of case ids, it implies include_all is false
 #If you pass an array of case ids, it implies include_all is false
@@ -972,9 +874,7 @@ sub createRun {
     return $result;
     return $result;
 }
 }
 
 
-=over 4
-
-=item B<deleteRun (run_id)>
+=head2 B<deleteRun (run_id)>
 
 
 Deletes specified run.
 Deletes specified run.
 
 
@@ -988,8 +888,6 @@ Returns BOOLEAN.
 
 
     $tr->deleteRun(1324);
     $tr->deleteRun(1324);
 
 
-=back
-
 =cut
 =cut
 
 
 sub deleteRun {
 sub deleteRun {
@@ -998,9 +896,7 @@ sub deleteRun {
     return $result;
     return $result;
 }
 }
 
 
-=over 4
-
-=item B<getRunByName (project_id,name)>
+=head2 B<getRunByName (project_id,name)>
 
 
 Gets run by name.
 Gets run by name.
 
 
@@ -1016,8 +912,6 @@ Returns run definition HASHREF.
 
 
     $tr->getRunByName(1,'gravy');
     $tr->getRunByName(1,'gravy');
 
 
-=back
-
 =cut
 =cut
 
 
 sub getRuns {
 sub getRuns {
@@ -1034,9 +928,7 @@ sub getRunByName {
     return 0;
     return 0;
 }
 }
 
 
-=over 4
-
-=item B<getRunByID (run_id)>
+=head2 B<getRunByID (run_id)>
 
 
 Gets run by ID.
 Gets run by ID.
 
 
@@ -1050,8 +942,6 @@ Returns run definition HASHREF.
 
 
     $tr->getRunByID(7779311);
     $tr->getRunByID(7779311);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getRunByID {
 sub getRunByID {
@@ -1061,9 +951,7 @@ sub getRunByID {
 
 
 =head1 PLAN METHODS
 =head1 PLAN METHODS
 
 
-=over 4
-
-=item B<createRun (project_id,name,description,milestone_id,entries)>
+=head2 B<createRun (project_id,name,description,milestone_id,entries)>
 
 
 Create a run.
 Create a run.
 
 
@@ -1091,8 +979,6 @@ Returns test plan definition HASHREF, or false on failure.
 
 
     $tr->createPlan(1,'Gosplan','Robo-Signed Soviet 5-year plan',22,$entries);
     $tr->createPlan(1,'Gosplan','Robo-Signed Soviet 5-year plan',22,$entries);
 
 
-=back
-
 =cut
 =cut
 
 
 sub createPlan {
 sub createPlan {
@@ -1109,9 +995,7 @@ sub createPlan {
     return $result;
     return $result;
 }
 }
 
 
-=over 4
-
-=item B<deletePlan (plan_id)>
+=head2 B<deletePlan (plan_id)>
 
 
 Deletes specified plan.
 Deletes specified plan.
 
 
@@ -1125,8 +1009,6 @@ Returns BOOLEAN.
 
 
     $tr->deletePlan(8675309);
     $tr->deletePlan(8675309);
 
 
-=back
-
 =cut
 =cut
 
 
 sub deletePlan {
 sub deletePlan {
@@ -1135,9 +1017,7 @@ sub deletePlan {
     return $result;
     return $result;
 }
 }
 
 
-=over 4
-
-=item B<getPlans (project_id)>
+=head2 B<getPlans (project_id)>
 
 
 Deletes specified plan.
 Deletes specified plan.
 
 
@@ -1151,8 +1031,6 @@ Returns ARRAYREF of plan definition HASHREFs.
 
 
     $tr->getPlans(8);
     $tr->getPlans(8);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getPlans {
 sub getPlans {
@@ -1160,9 +1038,7 @@ sub getPlans {
     return $self->_doRequest("index.php?/api/v2/get_plans/$project_id");
     return $self->_doRequest("index.php?/api/v2/get_plans/$project_id");
 }
 }
 
 
-=over 4
-
-=item B<getPlanByName (project_id,name)>
+=head2 B<getPlanByName (project_id,name)>
 
 
 Gets specified plan by name.
 Gets specified plan by name.
 
 
@@ -1178,8 +1054,6 @@ Returns plan definition HASHREF.
 
 
     $tr->getPlanByName(8,'GosPlan');
     $tr->getPlanByName(8,'GosPlan');
 
 
-=back
-
 =cut
 =cut
 
 
 sub getPlanByName {
 sub getPlanByName {
@@ -1191,9 +1065,7 @@ sub getPlanByName {
     return 0;
     return 0;
 }
 }
 
 
-=over 4
-
-=item B<getPlanByID (plan_id)>
+=head2 B<getPlanByID (plan_id)>
 
 
 Gets specified plan by ID.
 Gets specified plan by ID.
 
 
@@ -1207,8 +1079,6 @@ Returns plan definition HASHREF.
 
 
     $tr->getPlanByID(2);
     $tr->getPlanByID(2);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getPlanByID {
 sub getPlanByID {
@@ -1218,9 +1088,7 @@ sub getPlanByID {
 
 
 =head1 MILESTONE METHODS
 =head1 MILESTONE METHODS
 
 
-=over 4
-
-=item B<createMilestone (project_id,name,description,due_on)>
+=head2 B<createMilestone (project_id,name,description,due_on)>
 
 
 Create a milestone.
 Create a milestone.
 
 
@@ -1240,8 +1108,6 @@ Returns milestone definition HASHREF, or false on failure.
 
 
     $tr->createMilestone(1,'Patriotic victory of world perlism','Accomplish by Robo-Signed Soviet 5-year plan',time()+157788000);
     $tr->createMilestone(1,'Patriotic victory of world perlism','Accomplish by Robo-Signed Soviet 5-year plan',time()+157788000);
 
 
-=back
-
 =cut
 =cut
 
 
 sub createMilestone {
 sub createMilestone {
@@ -1257,9 +1123,7 @@ sub createMilestone {
     return $result;
     return $result;
 }
 }
 
 
-=over 4
-
-=item B<deleteMilestone (milestone_id)>
+=head2 B<deleteMilestone (milestone_id)>
 
 
 Deletes specified milestone.
 Deletes specified milestone.
 
 
@@ -1273,8 +1137,6 @@ Returns BOOLEAN.
 
 
     $tr->deleteMilestone(86);
     $tr->deleteMilestone(86);
 
 
-=back
-
 =cut
 =cut
 
 
 sub deleteMilestone {
 sub deleteMilestone {
@@ -1283,9 +1145,7 @@ sub deleteMilestone {
     return $result;
     return $result;
 }
 }
 
 
-=over 4
-
-=item B<getMilestones (project_id)>
+=head2 B<getMilestones (project_id)>
 
 
 Get milestones for some project.
 Get milestones for some project.
 
 
@@ -1299,8 +1159,6 @@ Returns ARRAYREF of milestone definition HASHREFs.
 
 
     $tr->getMilestones(8);
     $tr->getMilestones(8);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getMilestones {
 sub getMilestones {
@@ -1308,9 +1166,7 @@ sub getMilestones {
     return $self->_doRequest("index.php?/api/v2/get_milestones/$project_id");
     return $self->_doRequest("index.php?/api/v2/get_milestones/$project_id");
 }
 }
 
 
-=over 4
-
-=item B<getMilestoneByName (project_id,name)>
+=head2 B<getMilestoneByName (project_id,name)>
 
 
 Gets specified milestone by name.
 Gets specified milestone by name.
 
 
@@ -1326,8 +1182,6 @@ Returns milestone definition HASHREF.
 
 
     $tr->getMilestoneByName(8,'whee');
     $tr->getMilestoneByName(8,'whee');
 
 
-=back
-
 =cut
 =cut
 
 
 sub getMilestoneByName {
 sub getMilestoneByName {
@@ -1339,9 +1193,7 @@ sub getMilestoneByName {
     return 0;
     return 0;
 }
 }
 
 
-=over 4
-
-=item B<getMilestoneByID (plan_id)>
+=head2 B<getMilestoneByID (plan_id)>
 
 
 Gets specified milestone by ID.
 Gets specified milestone by ID.
 
 
@@ -1355,8 +1207,6 @@ Returns milestione definition HASHREF.
 
 
     $tr->getMilestoneByID(2);
     $tr->getMilestoneByID(2);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getMilestoneByID {
 sub getMilestoneByID {
@@ -1366,9 +1216,7 @@ sub getMilestoneByID {
 
 
 =head1 TEST METHODS
 =head1 TEST METHODS
 
 
-=over 4
-
-=item B<getTests (run_id)>
+=head2 B<getTests (run_id)>
 
 
 Get tests for some run.
 Get tests for some run.
 
 
@@ -1382,8 +1230,6 @@ Returns ARRAYREF of test definition HASHREFs.
 
 
     $tr->getTests(8);
     $tr->getTests(8);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getTests {
 sub getTests {
@@ -1391,9 +1237,7 @@ sub getTests {
     return $self->_doRequest("index.php?/api/v2/get_tests/$run_id");
     return $self->_doRequest("index.php?/api/v2/get_tests/$run_id");
 }
 }
 
 
-=over 4
-
-=item B<getTestByName (run_id,name)>
+=head2 B<getTestByName (run_id,name)>
 
 
 Gets specified test by name.
 Gets specified test by name.
 
 
@@ -1409,8 +1253,6 @@ Returns test definition HASHREF.
 
 
     $tr->getTestByName(36,'wheeTest');
     $tr->getTestByName(36,'wheeTest');
 
 
-=back
-
 =cut
 =cut
 
 
 sub getTestByName {
 sub getTestByName {
@@ -1422,9 +1264,7 @@ sub getTestByName {
     return 0;
     return 0;
 }
 }
 
 
-=over 4
-
-=item B<getTestByID (test_id)>
+=head2 B<getTestByID (test_id)>
 
 
 Gets specified test by ID.
 Gets specified test by ID.
 
 
@@ -1438,8 +1278,6 @@ Returns test definition HASHREF.
 
 
     $tr->getTestByID(222222);
     $tr->getTestByID(222222);
 
 
-=back
-
 =cut
 =cut
 
 
 sub getTestByID {
 sub getTestByID {
@@ -1447,16 +1285,12 @@ sub getTestByID {
     return $self->_doRequest("index.php?/api/v2/get_test/$test_id");
     return $self->_doRequest("index.php?/api/v2/get_test/$test_id");
 }
 }
 
 
-=over 4
-
-=item B<getTestResultFields()>
+=head2 B<getTestResultFields()>
 
 
 Gets custom fields that can be set for tests.
 Gets custom fields that can be set for tests.
 
 
 Returns ARRAYREF of result definition HASHREFs.
 Returns ARRAYREF of result definition HASHREFs.
 
 
-=back
-
 =cut
 =cut
 
 
 sub getTestResultFields {
 sub getTestResultFields {
@@ -1464,16 +1298,12 @@ sub getTestResultFields {
     return $self->_doRequest('index.php?/api/v2/get_result_fields');
     return $self->_doRequest('index.php?/api/v2/get_result_fields');
 }
 }
 
 
-=over 4
-
-=item B<getPossibleTestStatuses()>
+=head2 B<getPossibleTestStatuses()>
 
 
 Gets all possible statuses a test can be set to.
 Gets all possible statuses a test can be set to.
 
 
 Returns ARRAYREF of status definition HASHREFs.
 Returns ARRAYREF of status definition HASHREFs.
 
 
-=back
-
 =cut
 =cut
 
 
 sub getPossibleTestStatuses {
 sub getPossibleTestStatuses {
@@ -1481,9 +1311,7 @@ sub getPossibleTestStatuses {
     return $self->_doRequest('index.php?/api/v2/get_statuses');
     return $self->_doRequest('index.php?/api/v2/get_statuses');
 }
 }
 
 
-=over 4
-
-=item B<createTestResults(test_id,status_id,comment,options,custom_options)>
+=head2 B<createTestResults(test_id,status_id,comment,options,custom_options)>
 
 
 Creates a result entry for a test.
 Creates a result entry for a test.
 
 
@@ -1514,8 +1342,6 @@ Returns result definition HASHREF.
 
 
     $res = $tr->createTestResults(1,2,'Test failed because it was all like WAAAAAAA when I poked it',$options,$custom_options);
     $res = $tr->createTestResults(1,2,'Test failed because it was all like WAAAAAAA when I poked it',$options,$custom_options);
 
 
-=back
-
 =cut
 =cut
 
 
 sub createTestResults {
 sub createTestResults {
@@ -1543,9 +1369,7 @@ sub createTestResults {
     return $self->_doRequest("index.php?/api/v2/add_result/$test_id",'POST',$stuff);
     return $self->_doRequest("index.php?/api/v2/add_result/$test_id",'POST',$stuff);
 }
 }
 
 
-=over 4
-
-=item B<getTestResults(test_id,limit)>
+=head2 B<getTestResults(test_id,limit)>
 
 
 Get the recorded results for desired test, limiting output to 'limit' entries.
 Get the recorded results for desired test, limiting output to 'limit' entries.
 
 
@@ -1568,16 +1392,10 @@ sub getTestResults {
     return $self->_doRequest($url);
     return $self->_doRequest($url);
 }
 }
 
 
-=over 4
-
-=item B<buildStepResults(content,expected,actual,status_id)>
+=head2 B<buildStepResults(content,expected,actual,status_id)>
 
 
 Convenience method to build the stepResult hashes seen in the custom options for getTestResults.
 Convenience method to build the stepResult hashes seen in the custom options for getTestResults.
 
 
-=back
-
-=back
-
 =cut
 =cut
 
 
 #Convenience method for building stepResults
 #Convenience method for building stepResults
@@ -1598,12 +1416,19 @@ __END__
 =head1 SEE ALSO
 =head1 SEE ALSO
 
 
 L<Test::More>
 L<Test::More>
+
 L<HTTP::Request>
 L<HTTP::Request>
+
 L<LWP::UserAgent>
 L<LWP::UserAgent>
+
 L<JSON::XS>
 L<JSON::XS>
 
 
 http://docs.gurock.com/testrail-api2/start
 http://docs.gurock.com/testrail-api2/start
 
 
 =head1 AUTHOR
 =head1 AUTHOR
 
 
-George Baugh (gbaugh@cpanel.net)
+George Baugh (george@troglodyne.net)
+
+=head1 SPECIAL THANKS
+
+Thanks to cPanel Inc, for graciously funding the creation of this module.