| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package eBay::API::XML::BaseXml; | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  | ########################################################################## | 
| 4 |  |  |  |  |  |  | # | 
| 5 |  |  |  |  |  |  | # Module: ............... /eBay/API/XML | 
| 6 |  |  |  |  |  |  | # File: ................. BaseXml.pm | 
| 7 |  |  |  |  |  |  | # Original Author: ...... Jeff Nokes | 
| 8 |  |  |  |  |  |  | # | 
| 9 |  |  |  |  |  |  | # Convert to UNIX lines | 
| 10 |  |  |  |  |  |  | # | 
| 11 |  |  |  |  |  |  | ########################################################################## | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  | =pod | 
| 14 |  |  |  |  |  |  |  | 
| 15 |  |  |  |  |  |  | =head1 NAME | 
| 16 |  |  |  |  |  |  |  | 
| 17 |  |  |  |  |  |  | eBay::API::XML::BaseXml - Configuration methods for XML-specific aspects | 
| 18 |  |  |  |  |  |  |  | 
| 19 |  |  |  |  |  |  | =head1 INHERITANCE | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  | eBay::API::XML::BaseXml inherits from the L class | 
| 22 |  |  |  |  |  |  |  | 
| 23 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | This top-level Perl module encapsulates all the functionality for the | 
| 26 |  |  |  |  |  |  | eBay XML-specific aspects of the eBay API.  This library is really a | 
| 27 |  |  |  |  |  |  | parent class wrapper to the classes eBay::API::XML::Session, and the | 
| 28 |  |  |  |  |  |  | various call classes. | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | =cut | 
| 31 |  |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  | # Required Includes | 
| 33 |  |  |  |  |  |  | # -------------------------------------------------------------------------- | 
| 34 | 4 |  |  | 4 |  | 19 | use strict;                   # Used to control variable hell. | 
|  | 4 |  |  |  |  | 9 |  | 
|  | 4 |  |  |  |  | 142 |  | 
| 35 | 4 |  |  | 4 |  | 2250 | use eBay::API::BaseApi; | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | use Exporter;                 # For Perl symbol export functionality. | 
| 37 |  |  |  |  |  |  | use Data::Dumper;             # Used for logging support. | 
| 38 |  |  |  |  |  |  |  | 
| 39 |  |  |  |  |  |  | # Variable Declarations | 
| 40 |  |  |  |  |  |  | # -------------------------------------------------------------------------- | 
| 41 |  |  |  |  |  |  | # Constants | 
| 42 |  |  |  |  |  |  | use constant TRUE    => scalar 1; | 
| 43 |  |  |  |  |  |  | use constant FALSE   => scalar 0; | 
| 44 |  |  |  |  |  |  |  | 
| 45 |  |  |  |  |  |  | # Global Variables | 
| 46 |  |  |  |  |  |  | our @ISA = ("Exporter", | 
| 47 |  |  |  |  |  |  | "eBay::API::BaseApi" | 
| 48 |  |  |  |  |  |  | );     # Need to sub the Exporter class, to use the EXPORT* arrays below. | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | =head1 Subroutines | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  | =cut | 
| 53 |  |  |  |  |  |  |  | 
| 54 |  |  |  |  |  |  |  | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | # Subroutine Prototypes | 
| 57 |  |  |  |  |  |  | # -------------------------------------------------------------------------------- | 
| 58 |  |  |  |  |  |  | # Method Name                              Accessor Privileges      Method Type | 
| 59 |  |  |  |  |  |  |  | 
| 60 |  |  |  |  |  |  | sub setApiUrl($$;);                   #         Public                Instance | 
| 61 |  |  |  |  |  |  | sub getApiUrl($;);                    #         Public                Instance | 
| 62 |  |  |  |  |  |  |  | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  |  | 
| 65 |  |  |  |  |  |  | # Main Script | 
| 66 |  |  |  |  |  |  | # -------------------------------------------------------------------------------- | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  |  | 
| 69 |  |  |  |  |  |  | # Subroutine Definitions | 
| 70 |  |  |  |  |  |  | # -------------------------------------------------------------------------------- | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  |  | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  |  | 
| 75 |  |  |  |  |  |  |  | 
| 76 |  |  |  |  |  |  | =head2 setApiUrl() | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  | Setter method to define the URL all eBay XML API requests are sent to. | 
| 79 |  |  |  |  |  |  | This instance variable is normally set via the | 
| 80 |  |  |  |  |  |  | $ENV{EBAY_API_XML_TRANSPORT} but this method can override it. | 
| 81 |  |  |  |  |  |  |  | 
| 82 |  |  |  |  |  |  | Arguments: | 
| 83 |  |  |  |  |  |  |  | 
| 84 |  |  |  |  |  |  | =over 4 | 
| 85 |  |  |  |  |  |  |  | 
| 86 |  |  |  |  |  |  | =item * | 
| 87 |  |  |  |  |  |  |  | 
| 88 |  |  |  |  |  |  | Reference to object of type eBay::API::XML. | 
| 89 |  |  |  |  |  |  |  | 
| 90 |  |  |  |  |  |  | =item * | 
| 91 |  |  |  |  |  |  |  | 
| 92 |  |  |  |  |  |  | Scalar representing the fully qualified URL of the eBay XML API proxy. | 
| 93 |  |  |  |  |  |  |  | 
| 94 |  |  |  |  |  |  | =back | 
| 95 |  |  |  |  |  |  |  | 
| 96 |  |  |  |  |  |  | Returns: | 
| 97 |  |  |  |  |  |  |  | 
| 98 |  |  |  |  |  |  | =over 4 | 
| 99 |  |  |  |  |  |  |  | 
| 100 |  |  |  |  |  |  | =item * | 
| 101 |  |  |  |  |  |  |  | 
| 102 |  |  |  |  |  |  | B The value of eBay API URL (should be the same value that | 
| 103 |  |  |  |  |  |  | was provided by the user) | 
| 104 |  |  |  |  |  |  |  | 
| 105 |  |  |  |  |  |  | =item * | 
| 106 |  |  |  |  |  |  |  | 
| 107 |  |  |  |  |  |  | B    undefined | 
| 108 |  |  |  |  |  |  |  | 
| 109 |  |  |  |  |  |  | =back | 
| 110 |  |  |  |  |  |  |  | 
| 111 |  |  |  |  |  |  | =cut | 
| 112 |  |  |  |  |  |  |  | 
| 113 |  |  |  |  |  |  |  | 
| 114 |  |  |  |  |  |  | sub setApiUrl($$;) { | 
| 115 |  |  |  |  |  |  |  | 
| 116 |  |  |  |  |  |  | # Local Variables | 
| 117 |  |  |  |  |  |  | my $this_sub = 'setApiUrl'; | 
| 118 |  |  |  |  |  |  |  | 
| 119 |  |  |  |  |  |  | # Get all values passed in. | 
| 120 |  |  |  |  |  |  | my($self, $proxy) = @_; | 
| 121 |  |  |  |  |  |  |  | 
| 122 |  |  |  |  |  |  | # Todo: validate $self is right class of object | 
| 123 |  |  |  |  |  |  |  | 
| 124 |  |  |  |  |  |  | # Set the proxy | 
| 125 |  |  |  |  |  |  | $self->{proxy} =  $proxy; | 
| 126 |  |  |  |  |  |  |  | 
| 127 |  |  |  |  |  |  | # Return success to the caller. | 
| 128 |  |  |  |  |  |  | return($proxy); | 
| 129 |  |  |  |  |  |  |  | 
| 130 |  |  |  |  |  |  | }# end sub setApiUrl() | 
| 131 |  |  |  |  |  |  |  | 
| 132 |  |  |  |  |  |  |  | 
| 133 |  |  |  |  |  |  |  | 
| 134 |  |  |  |  |  |  | =head2 getApiUrl() | 
| 135 |  |  |  |  |  |  |  | 
| 136 |  |  |  |  |  |  | Local getter method for getting the current value of eBay API URL. | 
| 137 |  |  |  |  |  |  |  | 
| 138 |  |  |  |  |  |  | Arguments: | 
| 139 |  |  |  |  |  |  |  | 
| 140 |  |  |  |  |  |  | =over 4 | 
| 141 |  |  |  |  |  |  |  | 
| 142 |  |  |  |  |  |  | =item * | 
| 143 |  |  |  |  |  |  |  | 
| 144 |  |  |  |  |  |  | Reference to object of type eBay::API::XML. | 
| 145 |  |  |  |  |  |  |  | 
| 146 |  |  |  |  |  |  | =back | 
| 147 |  |  |  |  |  |  |  | 
| 148 |  |  |  |  |  |  | Returns: | 
| 149 |  |  |  |  |  |  |  | 
| 150 |  |  |  |  |  |  | =over 4 | 
| 151 |  |  |  |  |  |  |  | 
| 152 |  |  |  |  |  |  | =item * | 
| 153 |  |  |  |  |  |  |  | 
| 154 |  |  |  |  |  |  | B  The value of eBay API URL. | 
| 155 |  |  |  |  |  |  |  | 
| 156 |  |  |  |  |  |  | =item * | 
| 157 |  |  |  |  |  |  |  | 
| 158 |  |  |  |  |  |  | B    undefined | 
| 159 |  |  |  |  |  |  |  | 
| 160 |  |  |  |  |  |  | =back | 
| 161 |  |  |  |  |  |  |  | 
| 162 |  |  |  |  |  |  | =cut | 
| 163 |  |  |  |  |  |  |  | 
| 164 |  |  |  |  |  |  |  | 
| 165 |  |  |  |  |  |  |  | 
| 166 |  |  |  |  |  |  | sub getApiUrl($;) { | 
| 167 |  |  |  |  |  |  |  | 
| 168 |  |  |  |  |  |  | # Local Variables | 
| 169 |  |  |  |  |  |  | my($self) = @_; | 
| 170 |  |  |  |  |  |  |  | 
| 171 |  |  |  |  |  |  | # Return success to the caller. | 
| 172 |  |  |  |  |  |  | return($self->{proxy}); | 
| 173 |  |  |  |  |  |  |  | 
| 174 |  |  |  |  |  |  | }# end sub getApiUrl() | 
| 175 |  |  |  |  |  |  |  | 
| 176 |  |  |  |  |  |  |  | 
| 177 |  |  |  |  |  |  |  | 
| 178 |  |  |  |  |  |  |  | 
| 179 |  |  |  |  |  |  |  | 
| 180 |  |  |  |  |  |  |  | 
| 181 |  |  |  |  |  |  |  | 
| 182 |  |  |  |  |  |  | # Return TRUE to perl | 
| 183 |  |  |  |  |  |  | 1; |