Searched refs:Readonly (Results 1 - 25 of 50) sorted by relevance

12

/macosx-10.9.5/CPANInternal-140/Readonly-XS/
H A DMakefile.PL6 'NAME' => 'Readonly::XS',
8 'PREREQ_PM' => {Readonly => 1.02}, # e.g., Module::Name => 1.1
H A DXS.pm7 Readonly::XS - Companion module for Readonly.pm, to speed up read-only
12 This document describes version 1.04 of Readonly::XS, December 6, 2005.
16 package Readonly::XS;
25 XSLoader::load('Readonly::XS', $VERSION);
29 # It is an error to use this from any module but Readonly.
34 if ($MAGIC_COOKIE ne "Do NOT use or require Readonly::XS unless you're me.")
37 Carp::croak "Readonly::XS is not a standalone module. You should not use it directly.";
48 *{"Readonly::$func"} = \&$func;
50 $Readonly
[all...]
/macosx-10.9.5/CPANInternal-140/Readonly-XS-1.05/
H A DMakefile.PL6 'NAME' => 'Readonly::XS',
8 'PREREQ_PM' => {Readonly => 1.02}, # e.g., Module::Name => 1.1
H A DXS.xs8 MODULE = Readonly::XS PACKAGE = Readonly::XS
H A DXS.pm3 Readonly::XS - Companion module for Readonly.pm, to speed up read-only
8 This document describes version 1.05 of Readonly::XS, February 24, 2009.
12 package Readonly::XS;
21 XSLoader::load('Readonly::XS', $VERSION);
24 # It is an error to use this from any module but Readonly.
29 if ($MAGIC_COOKIE ne "Do NOT use or require Readonly::XS unless you're me.")
32 Carp::croak("Readonly::XS is not a standalone module. You should not use it directly.");
43 *{"Readonly::$func"} = \&$func;
45 $Readonly
[all...]
/macosx-10.9.5/CPANInternal-140/Readonly/t/
H A Dreadonly.t3 # Test the Readonly function
9 BEGIN {use_ok('Readonly'); }
15 skip 'Readonly \\ syntax is for perls earlier than 5.8', 9 if $] >= 5.008;
17 eval q{Readonly \my $ros => 45};
20 eval q{Readonly \my $ros2 => 45; $ros2 = 45};
23 eval q{Readonly \my @roa => (1, 2, 3, 4)};
26 eval q{Readonly \my @roa2 => (1, 2, 3, 4); $roa2[2] = 3};
29 eval q{Readonly \my %roh => (key1 => "value", key2 => "value2")};
32 eval q{Readonly \my %roh => (key1 => "value", "key2")};
35 eval q{Readonly \m
[all...]
H A Ddocs.t9 BEGIN {use_ok('Readonly'); }
20 eval {Readonly::Scalar $a1 => "A string value";};
24 eval {Readonly::Scalar $a2 => $computed_value;};
27 eval {Readonly::Array @a1 => (1, 2, 3, 4)};
30 eval {Readonly::Array @a2 => 1, 2, 3, 4};
33 eval {Readonly::Array @a3 => qw/1 2 3 4/};
37 eval {Readonly::Array @a4 => @computed_values};
40 eval {Readonly::Array @a5 => ()};
42 eval {Readonly::Array @a6};
45 eval {Readonly
[all...]
H A Dreassign.t3 # Readonly reassignment-prevention tests
9 BEGIN {use_ok('Readonly'); }
13 Readonly::Scalar $s1 => 'a scalar value';
14 Readonly::Array @a1 => 'an', 'array', 'value';
15 Readonly::Hash %h1 => {a => 'hash', of => 'things'};
20 eval {Readonly::Scalar $s1 => "a second scalar value"};
21 like $@ => $err, 'Readonly::Scalar reassign die';
22 is $s1 => 'a scalar value', 'Readonly::Scalar reassign no effect';
25 eval {Readonly::Array @a1 => "another", "array"};
26 like $@ => $err, 'Readonly
[all...]
H A Dscalar.t3 # Readonly scalar tests
9 BEGIN {use_ok('Readonly'); }
22 eval {Readonly::Scalar $s1 => 13};
24 eval {Readonly::Scalar $ms1 => 31};
26 eval {Readonly::Scalar $s2 => undef};
28 eval 'Readonly::Scalar $ms2'; # must be eval string because it's a compile-time error
29 like $@ => qr/^Not enough arguments for Readonly::Scalar/, 'Try w/o args';
40 is $s1 => 13, 'Readonly global value unchanged';
45 skip "Scalars not tied: XS in use", 1 if $Readonly::XSokay;
H A Ddeeps.t9 BEGIN {use_ok('Readonly'); }
23 eval {Readonly::Scalar1 $s1 => ["this", "is", "a", "test", {x => 5}]};
25 eval {Readonly::Scalar $s2 => ["this", "is", "a", "test", {x => 5}]};
27 eval {Readonly::Scalar1 $s3 => $m2};
29 eval {Readonly::Scalar $s4 => $m2};
/macosx-10.9.5/CPANInternal-140/Readonly-1.03/t/
H A Dreadonly.t3 # Test the Readonly function
9 BEGIN {use_ok('Readonly'); }
15 skip 'Readonly \\ syntax is for perls earlier than 5.8', 9 if $] >= 5.008;
17 eval q{Readonly \my $ros => 45};
20 eval q{Readonly \my $ros2 => 45; $ros2 = 45};
23 eval q{Readonly \my @roa => (1, 2, 3, 4)};
26 eval q{Readonly \my @roa2 => (1, 2, 3, 4); $roa2[2] = 3};
29 eval q{Readonly \my %roh => (key1 => "value", key2 => "value2")};
32 eval q{Readonly \my %roh => (key1 => "value", "key2")};
35 eval q{Readonly \m
[all...]
H A Ddocs.t9 BEGIN {use_ok('Readonly'); }
20 eval {Readonly::Scalar $a1 => "A string value";};
24 eval {Readonly::Scalar $a2 => $computed_value;};
27 eval {Readonly::Array @a1 => (1, 2, 3, 4)};
30 eval {Readonly::Array @a2 => 1, 2, 3, 4};
33 eval {Readonly::Array @a3 => qw/1 2 3 4/};
37 eval {Readonly::Array @a4 => @computed_values};
40 eval {Readonly::Array @a5 => ()};
42 eval {Readonly::Array @a6};
45 eval {Readonly
[all...]
H A Dreassign.t3 # Readonly reassignment-prevention tests
9 BEGIN {use_ok('Readonly'); }
13 Readonly::Scalar $s1 => 'a scalar value';
14 Readonly::Array @a1 => 'an', 'array', 'value';
15 Readonly::Hash %h1 => {a => 'hash', of => 'things'};
20 eval {Readonly::Scalar $s1 => "a second scalar value"};
21 like $@ => $err, 'Readonly::Scalar reassign die';
22 is $s1 => 'a scalar value', 'Readonly::Scalar reassign no effect';
25 eval {Readonly::Array @a1 => "another", "array"};
26 like $@ => $err, 'Readonly
[all...]
H A Dscalar.t3 # Readonly scalar tests
9 BEGIN {use_ok('Readonly'); }
22 eval {Readonly::Scalar $s1 => 13};
24 eval {Readonly::Scalar $ms1 => 31};
26 eval {Readonly::Scalar $s2 => undef};
28 eval 'Readonly::Scalar $ms2'; # must be eval string because it's a compile-time error
29 like $@ => qr/^Not enough arguments for Readonly::Scalar/, 'Try w/o args';
40 is $s1 => 13, 'Readonly global value unchanged';
45 skip "Scalars not tied: XS in use", 1 if $Readonly::XSokay;
H A Ddeeps.t9 BEGIN {use_ok('Readonly'); }
23 eval {Readonly::Scalar1 $s1 => ["this", "is", "a", "test", {x => 5}]};
25 eval {Readonly::Scalar $s2 => ["this", "is", "a", "test", {x => 5}]};
27 eval {Readonly::Scalar1 $s3 => $m2};
29 eval {Readonly::Scalar $s4 => $m2};
/macosx-10.9.5/CPANInternal-140/Readonly/
H A Dbenchmark.pl3 # Very simple benchmark script to show how slow Readonly.pm is,
4 # and how Readonly::XS solves the problem.
7 use Readonly;
50 # Readonly.pm with Readonly::XS
53 Readonly::Scalar $roxs_lincoln => 'Fourscore and seven years ago...';
60 # Readonly.pm w/o Readonly::XS
64 local $Readonly::XSokay = 0; # disable XS
65 Readonly
[all...]
H A DReadonly.pm10 Readonly - Facility for creating read-only scalars, arrays, hashes.
14 This documentation describes version 1.03 of Readonly.pm, April 20, 2004.
25 package Readonly; package
26 $Readonly::VERSION = '1.03'; # Also change in the documentation!
36 # These functions may be overridden by Readonly::XS, if installed.
39 use vars qw/$XSokay/; # Set to true in Readonly::XS, if available
48 $Readonly::XS::MAGIC_COOKIE = "Do NOT use or require Readonly::XS unless you're me.";
49 eval 'use Readonly::XS';
55 package Readonly
176 package Readonly; package
[all...]
/macosx-10.9.5/CPANInternal-140/Readonly-1.03/
H A Dbenchmark.pl3 # Very simple benchmark script to show how slow Readonly.pm is,
4 # and how Readonly::XS solves the problem.
7 use Readonly;
50 # Readonly.pm with Readonly::XS
53 Readonly::Scalar $roxs_lincoln => 'Fourscore and seven years ago...';
60 # Readonly.pm w/o Readonly::XS
64 local $Readonly::XSokay = 0; # disable XS
65 Readonly
[all...]
H A DReadonly.pm10 Readonly - Facility for creating read-only scalars, arrays, hashes.
14 This documentation describes version 1.03 of Readonly.pm, April 20, 2004.
25 package Readonly; package
26 $Readonly::VERSION = '1.03'; # Also change in the documentation!
36 # These functions may be overridden by Readonly::XS, if installed.
39 use vars qw/$XSokay/; # Set to true in Readonly::XS, if available
48 $Readonly::XS::MAGIC_COOKIE = "Do NOT use or require Readonly::XS unless you're me.";
49 eval 'use Readonly::XS';
55 package Readonly
176 package Readonly; package
[all...]
/macosx-10.9.5/CPANInternal-140/Params-Validate/t/
H A D23-readonly.t10 eval "use Readonly";
11 if ( $@ || ! defined $Readonly::XS::VERSION )
13 plan skip_all => 'Need Readonly::XS and Readonly for this test';
22 Readonly my $spec => { foo => 1 };
26 is( $@, q{}, 'validate() call succeeded with Readonly spec hashref' );
30 Readonly my $spec => { type => SCALAR };
34 is( $@, q{}, 'validate_pos() call succeeded with Readonly spec hashref' );
/macosx-10.9.5/Security-55471.14.18/include/security_utilities/
H A Ddevrandom.h44 struct Readonly : public UnixPlusPlus::FileDesc { struct in class:Security::DevRandomGenerator
45 Readonly() { open("/dev/random", O_RDONLY); } function in struct:Security::DevRandomGenerator::Readonly
59 static ModuleNexus<Readonly> mReader;
/macosx-10.9.5/Security-55471.14.18/libsecurity_utilities/lib/
H A Ddevrandom.h44 struct Readonly : public UnixPlusPlus::FileDesc { struct in class:Security::DevRandomGenerator
45 Readonly() { open("/dev/random", O_RDONLY); } function in struct:Security::DevRandomGenerator::Readonly
59 static ModuleNexus<Readonly> mReader;
/macosx-10.9.5/CPANInternal-140/Pod-ProjectDocs/lib/Pod/ProjectDocs/
H A DConfig.pm7 use Readonly;
22 Readonly my $DEFAULT_TITLE => qq/MyProject's Libraries/;
23 Readonly my $DEFAULT_DESC => qq/manuals and libraries/;
24 Readonly my $DEFAULT_CHARSET => qq/UTF-8/;
25 Readonly my $DEFAULT_LANG => qq/en/;
/macosx-10.9.5/CPANInternal-140/Pod-ProjectDocs-0.40/lib/Pod/ProjectDocs/
H A DConfig.pm7 use Readonly;
22 Readonly my $DEFAULT_TITLE => qq/MyProject's Libraries/;
23 Readonly my $DEFAULT_DESC => qq/manuals and libraries/;
24 Readonly my $DEFAULT_CHARSET => qq/UTF-8/;
25 Readonly my $DEFAULT_LANG => qq/en/;
/macosx-10.9.5/CPANInternal-140/Readonly-XS-1.05/t/
H A Dtest.t3 # Test suite for Readonly::XS.
7 package Readonly; package
15 eval 'use Readonly::XS';
17 is substr($@,0,71) => "Readonly::XS is not a standalone module. You should not use it directly", 'Unauthorized use';
19 $Readonly::XS::MAGIC_COOKIE = "Do NOT use or require Readonly::XS unless you're me.";
20 delete $INC{'Readonly/XS.pm'};
21 eval 'use Readonly::XS';

Completed in 207 milliseconds

12