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::CODE (3)

.ds Aq ’

NAME

BSON::Code - JavaScript code data for BSON

CONTENTS

SYNOPSIS



    use BSON;

    my $code = BSON::Code->new(q[
        function be_weird(a) {
            if ( a > 20 ) {
                alert("Its too big!")
            }
            return function(b){
                alert(b)
            }
        }
    ]);



DESCRIPTION

This module is needed for BSON and it manages BSON’s code element.

METHODS

    new

Main constructor which takes two parameters: A string with JavaScript code and an optional hashref with scope.



    my $code = BSON::Code->new($js_code, { a => 6, b => 14 });



    code

Returns the JavaScript code.

    scope

Returns the scope hashref.

    length

Returns the length of the JavaScript code.

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::CODE (3) 2011-07-22

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