GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  BSON::STRING (3)

.ds Aq ’

NAME

BSON::String - String data for BSON

CONTENTS

SYNOPSIS



    use BSON encode;

    my $str1 = BSON::String->new(Jack Reacher);
    my $str2 = BSON::String->new(55);
    my $str3 = BSON::String->new(-1234.7654);

    my $bson = encode( { a => $str1, b => $str2, c => $str3 } );



DESCRIPTION

Since Perl does not distinguish between numbers and strings, this module is provides an explicit string type for BSON’s string element. It’s very simple and does not implement any operator overloading other than "".

METHODS

    new

Main constructor which takes a single parameter - the string.



    my $string = BSON::String->new(Hello, there!);
    print "$string\n";    # Prints Hello, there!
    if ( "$string" gt "abcde" ) {

        # This will work
        ...;
    }



    value

Returns the value of the string.

OVERLOAD

Only the "" operator is overloaded. You won’t be able to perform string comparison on a BSON::String instance.

SEE ALSO

BSON

AUTHOR

minimalist, <minimalist at lavabit.com>

BUGS

Bug reports and patches are welcome. Reports which include a failing Test::More style test are helpful and will receive priority.

LICENSE AND COPYRIGHT

Copyright 2011 minimalist.

This program is free software; you can redistribute it and/or modify it under the terms as perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 BSON::STRING (3) 2011-08-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.