Google::Adwords::Data - Base class for the Data modules


Google-Adwords documentation Contained in the Google-Adwords distribution.

Index


Code Index:

NAME

Top

Google::Adwords::Data - Base class for the Data modules

VERSION

Top

This documentation refers to Google::Adwords::Data version 0.2

DESCRIPTION

Top

This module is not supposed to be used directly. Use the child data modules.

AUTHOR

Top

Rohan Almeida <rohan@almeida.in>

LICENSE AND COPYRIGHT

Top


Google-Adwords documentation Contained in the Google-Adwords distribution.

package Google::Adwords::Data;
use strict;
use warnings;

use version; our $VERSION = qv('0.2');

use base qw/ Class::Accessor::Chained Google::Adwords /;

use HTML::Entities;

__PACKAGE__->mk_accessors(
    qw/
        /
);

sub get
{
    my $self = shift;

    my $key   = shift;
    my $value = $self->{$key};

    # check if called from within Google::Adwords:: namespace
    my $package = caller 1;
    if ( $package =~ /^Google::Adwords::\w+Service$/ )
    {
        return encode_entities( $value, '<>&' );
    }
    else
    {
        return $value;
    }
} # end sub get

1;