Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    eBay::API::XML::BaseDataType 0.25

    Download button

    No screenshots available
    Downloads: 314  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jeff Nokes | More programs
    Perl Artistic License / FREE
    October 5th, 2007, 00:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    eBay::API::XML::BaseDataType description

    A library is intended to provide a Perl based interface for the public eBay web services API.

    eBay::API::XML::BaseDataType is a library is intended to provide a Perl based interface for the public eBay web services API.

    Subroutines:

    new()

    serialize()

    deserialize()

    parameters:


    1. rhXmlSimple - Data structure created by parsing an XML str with
    XML::Simple

    2. recursionLevel - Level of recursion, this is an optional argument
    and it is used for debuging purposes only.
    If constant DISPLAY_RECURSION is set to 1,
    recursionLevel is used to pretty print the output
    tracing the recursion.

    3. sRawXmlString - XML string used to set objects properties. The string is
    first parsed by XML::Simple. Data structure that is
    received after parsing is used to populate object's
    properties (it overrides 'rhXmlSimple' parameter).
    'sRawXmlString' parameter should be used for test
    purposes only!!
    _formatScalarIfNeeded

    Access level: private

    1. 'xs:boolean'

    XML schema API calls for boolean values return 'true' and 'false'. During deserilization we convert API boolean values to perl's boolean values:

    1 (true) and 0 (false).

    2. XML:Simple parses empty tags into a hash reference?!?! converted into 'Location' => {}
    convertArray_To_RefToArrayIfNeeded()
    Some DataType setters set reference to an array and this function is used in such setters to convert passed paremeter to 'a reference to an array' if one is not passed.

    Example:

    DataType: FeesType.pm has 'setFee' setter. This setter expects a reference to an array to be passed.

    Still, we will support 3 types of parameters:

    1. parameter is a reference to an array, no conversion (just as should be)

    2. parameter is an array, convert it to a reference to an array

    3. parameter is a scalar, create an array with one element and then create a reference to that array

    This method is used in setters that expect a parameter of 'a reference to an array' type

    The generated setters look like the following one:

    sub setProperty {
    my $self = shift;
    $self->{'property'} = $self->convertArray_To_RefToArrayIfNeeded(@_);
    }
    _getDataTypeInstance()

    Used in getters that return a BaseDataType object. If the object is not defined, it instantiate it.

    This allows the following syntax:

    my $sSellerId = $pItem->getSeller()->getUserID();

    Otherwise we would have to write something like this:

    my $pSeller = $pItem->getSeller();
    if ( defined $pSeller ) {
    $SellerId = $pSeller->getUserID();
    }
    _getDataTypeArray()

    Used in getters that return an array.

    If the array is not defined instantiate it.

    Internally all arrays are stored as references to an array. Depending on calling context, this method returns either an array or a reference to an array, which means we can use both of the following syntaxes:

    my $ra = $pType->_getDataTypeArray(); # returns a ref to an array
    my @a = $pType->_getDataTypeArray(); # returns an array
    isEmpty()


    Returns:

    1 - If hash containing object properties is empty.

    0 - If hash conatining object properties is not empty

    Basically this means that:

    "scalar (keys @$self )" returns 0

    or "scalar %$self" returns 1

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    eBay API | XML parser | Perl module | eBay | API | XML

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM