David Farrell > WWW-betfair-1.02 > WWW::betfair

Download:
WWW-betfair-1.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 1.02   Source  

NAME ^

WWW::betfair - interact with the betfair API using OO Perl

VERSION ^

Version 1.02

WHAT IS BETFAIR? ^

betfair is a sports betting services provider best known for hosting the largest sports betting exchange in the world. The sports betting exchange works like a marketplace: betfair provides an anonymous platform for individuals to offer and take bets on sports events at a certain price and size; it is the ebay of betting. betfair provides an API for the sports betting exchange which enables users to search for sports events and markets, place and update bets and manage their account by depositing and withdrawing funds.

WHY USE THIS LIBRARY? ^

The betfair API communicates using verbose XML files which contain various bugs and quirks. WWW::betfair makes it easier to use the betfair API by providing a Perl interface which manages the befair session, serializing API calls to betfair into the required XML format and de-serializing and parsing the betfair responses back into Perl data structures. Additionally WWW::betfair provides:

WARNING ^

Betting using a software program can have unintended consequences. Check all argument types and values before using the methods in this library. Ensure that you adequately test any method of WWW::betfair before using the method and risking money on it. As per the software license it is provided AS IS and no liability is accepted for any costs or penalties caused by using WWW::betfair.

To understand how to use the betfair API it is essential to read the betfair documentation before using WWW::betfair. The betfair documentation is an excellent reference.

SYNOPSIS ^

WWW::betfair provides an object oriented Perl interface for the betfair v6 API. This library communicates via HTTPS to the betfair servers using XML. To use the API you must have an active and funded account with betfair, and be accessing the API from a location where betfair permits use (e.g. USA based connections are refused, but UK connections are allowed). WWW::betfair provides methods to connect to the betfair exchange, search for market prices place and update bets and manage your betfair account.

Example

    use WWW::betfair;
    use Data::Dumper;

    my $betfair = WWW::betfair->new;
    
    # login is required before performing any other services
    if ($betfair->login({username => 'sillymoos', password => 'password123'}) {
        
        # check account balance
        print Dumper($betfair->getAccountFunds);

        # get a list of all active event types (categories of sporting events e.g. football, tennis, boxing).
        print Dumper($betfair->getActiveEventTypes);

    }
    # login failed print the error message returned by betfair
    else {
        print Dumper($betfair->getError);
    }

NON API METHODS ^

new

Returns a new WWW::betfair object. Does not require any parameters.

Example

    my $betfair = WWW::betfair->new;

getError

Returns the error message from the betfair API response - this is useful when a request fails. After a successful call API the value returned by getError is 'OK'.

Example

    my $error = $betfair->getError;

getXMLSent

Returns a string of the XML message sent to betfair. This can be useful to inspect if de-bugging a failed API call.

Example

    my $xmlSent = $betfair->getXMLSent;

getXMLReceived

Returns a string of the XML message received from betfair. This can be useful to inspect if de-bugging a failed API call.

Example

    my $xmlReceived = $betfair->getXMLReceived;

getHashReceived

Returns a Perl data structure consisting of the entire de-serialized betfair XML response. This can be useful to inspect if de-bugging a failed API call and easier to read than the raw XML message, especially if used in conjunction with Data::Dumper.

Example

    my $hashReceived = $betfair->getHashReceived;

GENERAL API METHODS ^

login

Authenticates the user and starts a session with betfair. This is required before any other methods can be used. Returns 1 on success and 0 on failure. If login fails and you are sure that you are using the correct the credentials, check the $betfair->{error} attribute. A common reason for failure on login is not having a funded betfair account. To resolve this, simply make a deposit into your betfair account and the login should work. See login for details. Required arguments:

Example

    $betfair->login({
                username => 'sillymoos',
                password => 'password123',
              });

keepAlive

Refreshes the current session with betfair. Returns 1 on success and 0 on failure. See keepAlive for details. Does not require any parameters. This method is not normally required as a session expires after 24 hours of inactivity.

Example

    $betfair->keepAlive;

logout

Closes the current session with betfair. Returns 1 on success and 0 on failure. See logout for details. Does not require any parameters.

Example

    $betfair->logout;

READ ONLY BETTING API METHODS ^

convertCurrency

Returns the betfair converted amount of currency see convertCurrency for details. Requires a hashref with the following parameters:

Example

    $betfair->convertCurrency({ amount          => 5,
                                fromCurrency    => 'GBP',
                                toCurrency      => 'USD',
                              });

getActiveEventTypes

Returns an array of hashes of active event types or 0 on failure. See getActiveEventTypes for details. Does not require any parameters.

Example

    my $activeEventTypes = $betfair->getActiveEventTypes;

getAllCurrencies

Returns an arrayref of currency codes and the betfair GBP exchange rate. See getAllCurrencies. Requires no parameters.

Example

    $betfair->getAllCurrencies;

getAllCurrenciesV2

Returns an arrayref of currency codes, the betfair GBP exchange rate and staking sizes for the currency. See getAllCurrenciesV2. Requires no parameters.

Example

    $betfair->getAllCurrenciesV2;

getAllEventTypes

Returns an array of hashes of all event types or 0 on failure. See getAllEventTypes for details. Does not require any parameters.

Example

    my $allEventTypes = $betfair->getAllEventTypes;

getAllMarkets

Returns an array of hashes of all markets or 0 on failure. See getAllMarkets for details. Requires a hashref with the following parameters:

Example

    my $allMarkets = $betfair->getAllMarkets({exchangeId => 1});

getBet

Returns a hashref of betfair's bet response, including an array of all matches to a bet. See getBet for details. Requires a hashref with the following argument:

Example

    my $bet = $betfair->getBet({betId       => 123456789
                                exchangeId  => 1,
                              });

getBetHistory

Returns an arrayref of hashrefs of bets. See getBetHistory for details. Requires a hashref with the following parameters:

Example

    my $betHistory = $betfair->getBetHistory({
                            betTypesIncluded    => 'M',
                            detailed            => 'false',
                            eventTypeIds        => [6],
                            marketTypesIncluded => ['O', 'L', 'R'],
                            placedDateFrom      => '2013-01-01T00:00:00.000Z',         
                            placedDateTo        => '2013-06-16T00:00:00.000Z',         
                            recordCount         => 100,
                            sortBetsBy          => 'PLACED_DATE',
                            startRecord         => 0,
                            exchangeId          => 1,
                            });

getBetLite

Returns a hashref of bet information. See getBetLite for details. Requires a hashref with the following key pair/s:

Example

    my $betData = $betfair->getBetLite({betId       => 123456789
                                        exchangeId  => 2,
                                       });

getBetMatchesLite

Returns an arrayref of hashrefs of matched bet information. See getBetMatchesLite for details. Requires a hashref with the following key pair/s:

Example

    my $betData = $betfair->getBetMatchesLite({ betId       => 123456789
                                                exchangeId  => 1,
                                               });

getCompleteMarketPricesCompressed

Returns a hashref of market data including an arrayhashref of individual selection prices data. See getCompleteMarketPricesCompressed for details. Note that this method de-serializes the compressed string returned by the betfair method into a Perl data structure. Requires:

Example

    my $marketPriceData = $betfair->getCompleteMarketPricesCompressed({ marketId    => 123456789,
                                                                        exchangeId  => 2,
                                                                      }); 

getCurrentBets

Returns an arrayref of hashrefs of current bets or 0 on failure. See getCurrentBets for details. Requires a hashref with the following parameters:

Example

    my $bets = $betfair->getCurrentBets({
                            betStatus           => 'M',
                            detailed            => 'false',
                            orderBy             => 'PLACED_DATE',
                            recordCount         => 100,
                            startRecord         => 0,
                            noTotalRecordCount  => 'true',
                            exchangeId          => 1,
                            });

getCurrentBetsLite

Returns an arrayref of hashrefs of current bets for a single market or the entire exchange. See getCurrentBetsLite for details. Requires a hashref with the following parameters:

Example

    my $bets = $betfair->getCurrentBetsLite({
                            betStatus           => 'M',
                            orderBy             => 'PLACED_DATE',
                            recordCount         => 100,
                            startRecord         => 0,
                            noTotalRecordCount  => 'true',
                            exchangeId          => 1,
                            });

getDetailAvailableMktDepth

Returns an arrayref of current back and lay offers in a market for a specific selection. See getAvailableMktDepth for details. Requires a hashref with the following arguments:

Example

    my $selectionPrices = $betfair->getDetailAvailableMktDepth({marketId    => 123456789,
                                                                selectionId => 987654321,
                                                                exchangeId  => 1,
                                                               });

getEvents

Returns an array of hashes of events / markets or 0 on failure. See getEvents for details. Requires:

Example

    # betfair event id of tennis is 14
    my $tennisEvents = $betfair->getEvents({eventParentId => 14});

getInPlayMarkets

Returns an arrayref of hashrefs of market data or 0 on failure. See getInPlayMarkets for details. Requires the following parameter:

Example

    my $inPlayMarkets = $betfair->getInPlayMarkets({exchangeId => 1});

getMarket

Returns a hash of market data or 0 on failure. See getMarket for details. Requires:

Example

    my $marketData = $betfair->getMarket({  marketId    => 108690258,
                                            exchangeId  => 2,
                                         });

getMarketInfo

Returns a hash of market data or 0 on failure. See getMarketInfo for details. Requires a hashref with the following parameters:

Example

    my $marketData = $betfair->getMarketInfo({  marketId    => 108690258,
                                                exchangeId  => 1,
                                             });

getMarketPrices

Returns a hashref of market data or 0 on failure. See getMarketPrices for details. Requires:

Example

    my $marketPrices = $betfair->getMarketPrices({  marketId    => 108690258
                                                    exchangeId  => 2,
                                                 });

getMarketPricesCompressed

Returns a hashref of market data including an arrayhashref of individual selection prices data. See getMarketPricesCompressed for details. Note that this method de-serializes the compressed string returned by the betfair method into a Perl data structure. Requires:

Example

    my $marketPriceData = $betfair->getMarketPricesCompressed({marketId => 123456789}); 

getMUBets

Returns an arrayref of hashes of bets or 0 on failure. See getMUBets for details. Requires:

Example

    my $muBets = $betfair->getMUBets({
                            betStatus           => 'MU',
                            orderBy             => 'PLACED_DATE',
                            recordCount         => 1000,
                            startRecord         => 0,
                            noTotalRecordCount  => 'true',
                            sortOrder           => 'ASC',
                            marketId            => 123456789,
                            exchangeId          => 1,
                 });

getMUBetsLite

Returns an arrayref of hashes of bets or 0 on failure. See getMUBetsLite for details. Requires:

Example

    my $muBets = $betfair->getMUBetsLite({
                            betStatus           => 'MU',
                            orderBy             => 'PLACED_DATE',
                            excludeLastSecond   => 'false',
                            recordCount         => 100,
                            startRecord         => 0,
                            matchedSince        => '2013-06-01T00:00:00.000Z',
                            sortOrder           => 'ASC',
                            marketId            => 123456789,
                            exchangeId          => 1,
                 });

getMarketProfitAndLoss

Returns a hashref containing the profit and loss for a particular market. See getMarketProfitAndLoss for details. Requires:

Example

    my $marketProfitAndLoss = $betfair->getMarketProfitAndLoss({marketId        => 923456791,
                                                                includeBspBets  => 'false',
                                                                exchangeId      => 1,
                                                                });

getMarketTradedVolume

Returns an arrayref of hashrefs containing the traded volume for a particular market and selection. See getMarketTradedVolume for details. Requires:

Example

    my $marketVolume = $betfair->getMarketTradedVolume({marketId    => 923456791,
                                                        selectionId => 30571,
                                                        exchangeId  => 2,
                                                       });

getMarketTradedVolumeCompressed

Returns an arrayref of selections with their total matched amounts plus an array of all traded volume with the trade size and amount. See getMarketTradedVolumeCompressed for details. Note that this service de-serializes the compressed string return by betfair into a Perl data structure. Requires:

Example

    my $marketVolume = $betfair->getMarketTradedVolumeCompressed({  marketId    => 923456791,
                                                                    exchangeId  => 2,
                                                                 });

getPrivateMarkets

Returns an arrayref of private markets - see getPrivateMarkets for details. Requires a hashref with the following arguments:

Example

    my $privateMarkets = $betfair->getPrivateMarkets({  eventTypeId => 1,
                                                        marketType  => 'O',
                                                        exchangeId  => 1,
                                                    });

getSilks

This method is not available on the free betfair API.

Returns an arrayref of market racing silks data or 0 on failure. See getSilksV2 for details. Requires the following parameters:

Example

    my $silks = $betfair->getSilksV2({  markets     => [123456,9273649],
                                        exchangeId  => 1, 
                                     });

getSilksV2

This method is not available on the free betfair API.

Returns an arrayref of market racing silks data or 0 on failure. See getSilksV2 for details. Requires the following parameters:

Example

    my $silks = $betfair->getSilksV2({  markets     => [123456,9273649],
                                        exchangeId  => 1, 
                                     });

BET PLACEMENT API METHODS ^

cancelBets

Cancels up to 40 unmatched and active bets on betfair. Returns an arrayref of hashes of cancelled bets. See cancelBets for details. Requires a hashref with the following parameters:

Example

    my $cancelledBetsResults = $betfair->cancelBets({betIds     => [123456789, 987654321]
                                                     exchangeId => 2,   
                                                    });

cancelBetsByMarket

Receives an arrayref of marketIds and cancels all unmatched bets on those markets. Returns an arrayref of hashrefs of market ids and results. See cancelBetsByMarket for details. Requires a hashref with the following parameters:

Example

    my $cancelledBets = $betfair->cancelBetsByMarket({markets       => [123456789, 432596611],
                                                      exchangeId    => 1,
                                                     });

placeBets

Places up to 60 bets on betfair and returns an array of results or zero on failure. See placeBetshttp://bdp.betfair.com/docs/PlaceBets.html for details. Requires:

Example

    $myBetPlacedResults = $betfair->placeBets({
                                        bets        => [{   asianLineId         => 0,
                                                            betCategoryType     => 'E',
                                                            betPersistenceType  => 'NONE',
                                                            betType             => 'B',
                                                            bspLiability        => 2,
                                                            marketId            => 123456789,
                                                            price               => 5,
                                                            selectionId         => 99,
                                                            size                => 10,
                                                        }],
                                         exchangeId => 1,
                                    });

updateBets

Updates existing unmatched bets on betfair: the size, price and persistence can be updated. Note that only the size or the price can be updated in one request, if both parameters are provided betfair ignores the new size value. Returns an arrayref of hashes of updated bet results. See http://bdp.betfair.com/docs/UpdateBets.html for details. Requires:

Example

    my $updateBetDetails = $betfair->updateBets({
                                        bets        => [{betId                   => 12345,
                                                         newBetPersistenceType   => 'NONE',
                                                         newPrice                => 5,
                                                         newSize                 => 10,
                                                         oldBetPersistenceType   => 'NONE',
                                                         oldPrice                => 2,
                                                         oldSize                 => 10,
                                                        }],
                                        exchangeId  => 1,
                                    });

ACCOUNT MANAGEMENT API METHODS ^

addPaymentCard

Adds a payment card to your betfair account. Returns an arrayref of hashes of payment card responses or 0 on failure. See addPaymentCard. Requires:

Example

    my $addPaymentCardResponse = $betfair->addPaymentCard({
                                            cardNumber  => '1234123412341234',
                                            cardType    => 'VISA',
                                            cardStatus  => 'UNLOCKED',
                                            startDate   => '0113',
                                            expiryDate  => '0116',
                                            issueNumber => 'NULL',
                                            billingName => 'The Sillymoose',
                                            nickName    => 'democard',
                                            password    => 'password123',
                                            address1    => 'Tasty bush',
                                            address2    => 'Mountain Plains',
                                            town        => 'Hoofton',
                                            zipCode     => 'MO13FR',
                                            county      => 'Mooshire',
                                            country     => 'UK',
                                 });

deletePaymentCard

Deletes a registered payment card from your betfair account. See deletePaymentCard for further details. Returns the betfair response as a hashref or 0 on failure. Requires:

Example

    my $deleteCardResponse = $betfair->deletePaymentCard({
                                            nickName  => 'checking',
                                            password  => 'password123',
                                    });

depositFromPaymentCard

Deposits money in your betfair account using a payment card. See depositFromPaymentCard for further details. Returns the betfair response as a hashref or 0 on failure. Requires:

Example

    my $depositResponse = $betfair->depositFromPaymentCard({
                                            amount          => 10,
                                            cardIdentifier  => 'checking',
                                            cv2             => '999',
                                            password        => 'password123',
                                    });

forgotPassword

NB. This service is largely redundant as it requires an authenticated session to work, however it is included for the sake of completeness.

Resets the betfair account password via a 2 stage process. See forgotPassword and the example below for details. Returns the betfair response as a hashref for stage 1, 1 on a successful passwprd reset or 0 on failure. Note that this service can be difficult to succeed with - user the getError method to inspect the response message from betfair. Requires:

Example

    use Data::Dumper;

    my $securityQuestions = $betfair->forgotPassword({
                                            username            => 'sillymoose',
                                            emailAddress        => 'sillymoos@cpan.org',
                                            countryOfResidence  => 'United Kingdom',
                                    });
    print Dumper($securityQuestions);

    # now call service again with answers to security questions and new password parameters
    my $resetPasswordResponse =  $betfair->forgotPassword({
                                            username                    => 'sillymoose',
                                            emailAddress                => 'sillymoos@cpan.org',
                                            countryOfResidence          => 'United Kingdom',
                                            forgottenPasswordAnswer1    => 'dasher',
                                            forgottenPasswordAnswer2    => 'hoofs',
                                            newPassword                 => 'moojolicious',
                                            newPasswordRepeat           => 'moojolocious',
                                    });

getAccountFunds

Returns a hashref of the account funds betfair response. See getAccountFunds for details. Requires a hashref with the following parameters:

Example

    my $funds = $betfair->getAccountFunds({exchangeId => 1});

getAccountStatement

Returns an arrayref of hashes of account statement entries or 0 on failure. See getAccountStatement for further details. Requires:

Example

    # return an account statement for all activity starting at record 1 up to 1000 records between 1st January 2013 and 16th June 2013
    my $statement = $betfair->getAccountStatement({
                                    startRecord     => 0,
                                    recordCount     => 1000,
                                    startDate       => '2013-01-01T00:00:00.000Z',         
                                    endDate         => '2013-06-16T00:00:00.000Z',         
                                    itemsIncluded   => 'ALL',
                                    exchangeId      => 2,
                              });

getPaymentCard

Returns an arrayref of hashes of payment card or 0 on failure. See getPaymentCard for details. Does not require any parameters.

Example

    my $cardDetails = $betfair->getPaymentCard;

getSubscriptionInfo

This service is not available with the free betfair API.

Returns an arrayref of hashes of subscription or 0 on failure. See getSubscriptionInfo for details. Does not require any parameters.

Example

    my $subscriptionData = $betfair->getSubscriptionInfo;

modifyPassword

Changes the betfair account password. See modifyPassword for details. Returns the betfair response as a hashref or 0 on failure. Requires:

Example

    my $response = $betfair->modifyPassword({
                                        password            => 'itsasecret',
                                        newPassword         => 'moojolicious',
                                        newPasswordRepeat   => 'moojolicious',
                                    });

modifyProfile

Modifies the account profile details of the betfair account. See modifyProfile for details. Returns 1 on success or 0 on failure. Requires a hashref with the following parameters:

Example

    # update mobile number
    my $response = $betfair->modifyProfile({
                                    password        => 'itsasecret',
                                    mobileTelephone => '07777777777',
                                });

retrieveLIMBMessage

This service is not available with the betfair free API.

Returns a hashref of the betfair response. See retrieveLIMBMessage for details. No parameters are required.

Example

    my $limbMsg = $betfair->retrieveLimbMessage;

selfExclude

WARNING - using this method will deactivate your betfair account for a minimum of 6 months. See selfExclude for details. Returns 1 on success or 0 on failure. Requires the following parameters in a hashref:

Example

    $excludeResult = $betfair->selfExclude({
                                selfExclude => 'true',
                                password    => 'itsasecret',
                            });

setChatName

This service is not available with the free betfair API, nor with the paid personal betfair API.

Sets the chat name of the betfair account. See setChatName for details. Returns 1 on success or 0 on failure. Requires the following parameters in a hashref:

Example

    $excludeResult = $betfair->setChatName({
                                chatName => 'sillymoose',
                                password => 'itsasecret',
                            });

submitLIMBMessage

This service is not available with the betfair free API.

Submits a LIMB message to the betfair API. See submitLIMBMessage for details. Returns 1 on success or 0 on failure. betfair returns additional validation error information on failure, so be sure to check the error message using the getError method. Requires a hashref with the following parameters:

Example

    my $limbMsg = $betfair->submitLimbMessage({
                                        password                => 'itsasecret',
                                        submitPersonalMessage   => { messageId      => 123456789,
                                                                     acknowledgement=> 'Y',
                                                                   },
                                        });

transferFunds

Transfers funds between the UK and Australian wallets. See transferFunds for details. Returns a hashref of the betfair response or 0 on failure. Requires the following parameters in a hashref:

Example

    # transfer 15 from the UK wallet to the Australian wallet
    $excludeResult = $betfair->transferFunds({
                                sourceWalletId  => 1,
                                targetWalletId  => 2,
                                amount          => 15.0,
                            });

updatePaymentCard

Updates a payment card on your betfair account. Returns a hashref betfair response or 0 on failure. See updatePaymentCard. Requires:

Example

    my $updatePaymentCardResponse = $betfair->updatePaymentCard({
                                            cardStatus  => 'UNLOCKED',
                                            startDate   => '0113',
                                            expiryDate  => '0116',
                                            issueNumber => 'NULL',
                                            billingName => 'The Sillymoose',
                                            nickName    => 'democard',
                                            password    => 'password123',
                                            address1    => 'Tasty bush',
                                            address2    => 'Mountain Plains',
                                            town        => 'Hoofton',
                                            zipCode     => 'MO13FR',
                                            county      => 'Mooshire',
                                            country     => 'UK',
                                 });

viewProfile

Returns a hashref betfair response or 0 on failure. See viewProfile. Requires no parameters.

Example

    my $profile = $betfair->viewProfile;

viewProfileV2

Returns a hashref betfair response or 0 on failure. See viewProfileV2. Requires no parameters.

Example

    my $profile = $betfair->viewProfileV2;

viewReferAndEarn

Returns a hashref containing the betfair account's refer and earn code or 0 on failure. See viewReferAndEarn for details. Requires no parameters.

Example

    my $referAndEarnCode = $betfair->viewReferAndEarn;

withdrawToPaymentCard

Withdraws money from your betfair account to the payment card specified. Returns a hashref of the withdraw response from betfair or 0 on failure. See withdrawToPaymentCard for details. Requires:

Example

    my $withdrawalResult = $betfair->withdrawToPaymentCard({
                                        amount          => 10,
                                        cardIdentifier  => 'checking',
                                        password        => 'password123',
                                    }); 

INTERNAL METHODS ^

_doRequest

Processes requests to and from the betfair API.

_getServerURI

Returns the URI for the target betfair server depending on whether it is an exchange server (1 and 2) or the global server.

_sortArrayRef

Returns a sorted arrayref based on price.

_addPaymentCardLine

Pushes a hashref of payment card key / value pairs into an arrayref and returns the result.

_forceArray

Receives a reference variable and if the data is not an array, returns a single-element arrayref. Else returns the data as received.

_checkParams

Receives an hashref of parameter types and a hashref of arguments. Checks that all mandatory arguments are present using _checkParam and that no additional parameters exist in the hashref.

_checkParam

Checks the parameter using the TypeCheck.pm object, returns 1 on success and 0 on failure.

_clearData

Sets all message related object attributes to null - this is so that the error message from the previous API call is not mis-read as relevant to the current call.

AUTHOR ^

David Farrell, <davidnmfarrell at gmail.com>, perltricks.com

BUGS ^

Please report any bugs or feature requests to bug-www-betfair at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-betfair. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc WWW::betfair

You can also look for information at:

ACKNOWLEDGEMENTS ^

This project was inspired by the betfair free Perl project. Although WWW::betfair uses a different approach, the betfair free project was a useful point of reference at inception. Thanks guys!

Thanks to betfair for creating the exchange and API.

LICENSE AND COPYRIGHT ^

Copyright 2013 David Farrell.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

syntax highlighting: