view release on metacpan or search on metacpan
lib/Image/MetaData/JPEG/data/Tables.pm view on Meta::CPAN
#============================================================================#
# MakerNote stuff is stored in a separated file; the return value of this #
# inclusion is the $HASH_MAKERNOTES hash reference, containing all relevant #
# parameters. We only have to link this new table into $HASH_APP1_SUBIFD. #
#----------------------------------------------------------------------------#
our $HASH_MAKERNOTES = require 'Image/MetaData/JPEG/data/Makernotes.pl'; #
$$HASH_APP1_SUBIFD{'MakerNoteData_' . $_} = #
generate_lookup($$HASH_MAKERNOTES{$_}{tags} ,0) #
for keys %$HASH_MAKERNOTES; #
#============================================================================#
#============================================================================#
view all matches for this distribution
view release on metacpan or search on metacpan
libpng-1.6.17/scripts/options.awk view on Meta::CPAN
}
}
} else if (val == "requires" || val == "if" || val == "enables" || val =="sets") {
key = val
} else if (key == "requires") {
requires[opt] = requires[opt] " " val
} else if (key == "if") {
iffs[opt] = iffs[opt] " " val
} else if (key == "enables") {
enabledby[val] = enabledby[val] " " opt
} else if (key == "sets") {
view all matches for this distribution
view release on metacpan or search on metacpan
my $json_users = JSON::MaybeXS->new->encode($users);
my $report = $lua->eval(qq{
-- This script assumes a JSON library is available in the Lua environment.
-- We are using the 'dkjson' library in this example.
local json = require("json")
local users = json.decode($json_users)
function process_users(user_list)
local report = {}
for _, user in ipairs(user_list) do
view all matches for this distribution
view release on metacpan or search on metacpan
List::Util = 1.44
JSON::XS = 4
; Uncomment if you need JSON::XS
[DynamicPrereqs]
-body = requires('JSON::XS', '4.02') if has_module('JSON::XS', '4.01') or !defined has_module('JSON::XS', '4.01');
view all matches for this distribution
view release on metacpan or search on metacpan
external/rapidjson/schema.h view on Meta::CPAN
if (properties && properties->IsObject())
for (ConstMemberIterator itr = properties->MemberBegin(); itr != properties->MemberEnd(); ++itr)
AddUniqueElement(allProperties, itr->name);
if (required && required->IsArray())
for (ConstValueIterator itr = required->Begin(); itr != required->End(); ++itr)
if (itr->IsString())
AddUniqueElement(allProperties, *itr);
if (dependencies && dependencies->IsObject())
for (ConstMemberIterator itr = dependencies->MemberBegin(); itr != dependencies->MemberEnd(); ++itr) {
external/rapidjson/schema.h view on Meta::CPAN
patternPropertyCount_++;
}
}
if (required && required->IsArray())
for (ConstValueIterator itr = required->Begin(); itr != required->End(); ++itr)
if (itr->IsString()) {
SizeType index;
if (FindPropertyIndex(*itr, &index)) {
properties_[index].required = true;
hasRequired_ = true;
view all matches for this distribution
view release on metacpan or search on metacpan
jsonpath-compliance-test-suite/build.js view on Meta::CPAN
// @ts-check
const fs = require('fs');
const path = require('path');
/**
* The file extension of test files.
* @type {string}
*/
const fileExtension = '.json';
view all matches for this distribution
view release on metacpan or search on metacpan
simdjson.cpp view on Meta::CPAN
} -> std::same_as<typename std::remove_cvref_t<T>::reference>;
};
};
template <typename T>
concept smart_pointer = requires(std::remove_cvref_t<T> ptr) {
// Check if T has a member type named element_type
typename std::remove_cvref_t<T>::element_type;
// Check if T has a get() member function
{
simdjson.cpp view on Meta::CPAN
// Check if T can be dereferenced
{ *ptr } -> std::same_as<typename std::remove_cvref_t<T>::element_type &>;
};
template <typename T>
concept optional_type = requires(std::remove_cvref_t<T> obj) {
typename std::remove_cvref_t<T>::value_type;
{ obj.value() } -> std::same_as<typename std::remove_cvref_t<T>::value_type&>;
requires requires(typename std::remove_cvref_t<T>::value_type &&val) {
obj.emplace(std::move(val));
obj = std::move(val);
simdjson.cpp view on Meta::CPAN
namespace simdjson {
bool implementation::supported_by_runtime_system() const {
uint32_t required_instruction_sets = this->required_instruction_sets();
uint32_t supported_instruction_sets = internal::detect_supported_architectures();
return ((supported_instruction_sets & required_instruction_sets) == required_instruction_sets);
}
} // namespace simdjson
/* defining SIMDJSON_CONDITIONAL_INCLUDE */
simdjson.cpp view on Meta::CPAN
const implementation *available_implementation_list::detect_best_supported() const noexcept {
// They are prelisted in priority order, so we just go down the list
uint32_t supported_instruction_sets = internal::detect_supported_architectures();
for (const implementation *impl : internal::get_available_implementation_pointers()) {
uint32_t required_instruction_sets = impl->required_instruction_sets();
if ((supported_instruction_sets & required_instruction_sets) == required_instruction_sets) { return impl; }
}
return get_unsupported_singleton(); // this should never happen?
}
const implementation *detect_best_supported_implementation_on_first_use::set_best() const noexcept {
view all matches for this distribution
view release on metacpan or search on metacpan
t/spec/index.js view on Meta::CPAN
'use strict';
const Ajv = require('ajv');
const jsonSchemaTest = require('json-schema-test');
const assert = require('assert');
const refs = {
'http://localhost:1234/integer.json': require('./remotes/integer.json'),
'http://localhost:1234/subSchemas.json': require('./remotes/subSchemas.json'),
'http://localhost:1234/folder/folderInteger.json': require('./remotes/folder/folderInteger.json'),
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JSPL/Runtime/CommonJS.pm view on Meta::CPAN
use JSPL;
my $ctx->stock_context('commonJS');
$ctx->eval(q|
var print = function() {
var stdout = require("system").stdout;
stdout.print.apply(stdout, arguments);
}
|);
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
remove = Const::Fast::Exporter
remove = HTTP::Status
[EnsurePrereqsInstalled]
:version = 0.003
type = requires
type = recommends
[GitHub::Meta]
repo = git://github.com/robrwo/JavaScript-Const-Exporter.git
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JavaScript/Duktape/XS.pm view on Meta::CPAN
my $info = $vm->get_version_info();
$vm->set('perl_module_resolve', \&module_resolve);
$vm->set('perl_module_load', \&module_load);
$vm->eval('var badger = require("badger");');
=head1 DESCRIPTION
This module provides an XS wrapper to call Duktape from Perl.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JavaScript/Duktape/C/lib/duktape.c view on Meta::CPAN
h_obj = duk_push_this_coercible_to_object(thr);
DUK_ASSERT(h_obj != NULL);
ret = duk_hobject_get_own_propdesc(thr, h_obj, h_v, &desc, 0 /*flags*/); /* don't push value */
duk_push_boolean(thr, ret && ((desc.flags & required_desc_flags) == required_desc_flags));
return 1;
}
/*
* Object.seal() and Object.freeze() (E5 Sections 15.2.3.8 and 15.2.3.9)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JavaScript/Embedded/C/lib/duktape.c view on Meta::CPAN
h_obj = duk_push_this_coercible_to_object(thr);
DUK_ASSERT(h_obj != NULL);
ret = duk_hobject_get_own_propdesc(thr, h_obj, h_v, &desc, 0 /*flags*/); /* don't push value */
duk_push_boolean(thr, ret && ((desc.flags & required_desc_flags) == required_desc_flags));
return 1;
}
/*
* Object.seal() and Object.freeze() (E5 Sections 15.2.3.8 and 15.2.3.9)
view all matches for this distribution
view release on metacpan or search on metacpan
t/javascripts/test.js view on Meta::CPAN
//= require <curry>
mmm_curry();
view all matches for this distribution
view release on metacpan or search on metacpan
share/require.js view on Meta::CPAN
callStack = [];
global.require = function(id) {
// native module
var native = requireNative(id);
if (native) {
return native;
}
// resolve file
view all matches for this distribution
view release on metacpan or search on metacpan
share/handlebars-v4.0.11.js view on Meta::CPAN
try {
/* istanbul ignore next */
if (false) {
// We don't support this in AMD environments. For these environments, we asusme that
// they are running on the browser and thus have no need for the source-map library.
var SourceMap = require('source-map');
SourceNode = SourceMap.SourceNode;
}
} catch (err) {}
/* NOP */
view all matches for this distribution
view release on metacpan or search on metacpan
t/13_module.t view on Meta::CPAN
my $source;
if ($module_name eq 'pig.js') {
$source = sprintf("module.exports = 'you\\'re about to get eaten by %s';", $module_name);
}
elsif ($module_name eq 'cow.js') {
$source = "module.exports = require('pig');";
}
elsif ($module_name eq 'ape.js') {
$source = "module.exports = { module: module, __filename: __filename, wasLoaded: module.loaded };";
}
elsif ($module_name eq 'badger.js') {
t/13_module.t view on Meta::CPAN
SKIP: {
skip 'modules not (yet) supported in V8', 18;
$vm->eval('var p = require("pig");');
is($vm->typeof('p'), 'string', 'basic require()');
$vm->eval('var r = require("cow"); var c = r.indexOf("pig");');
# printf STDERR ("cow: %s", Dumper($vm->get('r')));
ok($vm->get('c') >= 0, 'nested require()');
$vm->eval('var ape1 = require("ape"); var ape2 = require("ape");');
my $a1 = $vm->get('ape1');
my $a2 = $vm->get('ape2');
is_deeply($a1, $a2, 'cached require');
$vm->eval('var ape1 = require("ape"); var inCache = "ape.js" in require.cache; delete require.cache["ape.js"]; var ape2 = require("ape");');
ok($vm->get('inCache'), 'cached required, inCache');
ok($vm->get('ape2') ne $vm->get('ape1'), 'cached require, not equal');
$vm->eval('var ape3 = require("ape");');
is($vm->typeof('ape3.module.require'), "function", "module.require is a function");
my $a30 = $vm->get('ape3');
my $a31 = $vm->get('ape3.module.exports');
t/13_module.t view on Meta::CPAN
ok( $a34, 'module loaded');
ok(!$a35, 'wasLoaded');
is($a36, 'ape.js', 'ape __filename');
$vm->eval('var badger = require("badger");');
# printf STDERR ("badger: %s", Dumper($vm->get('badger')));
is($vm->get('badger.foo'), 123, 'exports.foo assignment');
is($vm->get('badger.bar'), 234, 'exports.bar assignment');
$vm->eval('var comment = require("comment");');
# printf STDERR ("comment %s", Dumper($vm->get('comment')));
is($vm->get('comment.foo'), 123, 'comment.foo, last line with // comment');
is($vm->get('comment.bar'), 234, 'comment.bar, last line with // comment');
$vm->eval('var shebang = require("shebang");');
is($vm->get('shebang.foo'), 123, 'shebang.foo');
is($vm->get('shebang.bar'), 234, 'shebang.bar');
};
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/zzmem_plojb1.t view on Meta::CPAN
use Test::More;
plan skip_all => 'apparent memory-leak, fixes welcome';
use FindBin;
my $context = require "$FindBin::Bin/mem.pl";
plan skip_all => "no ps" unless check_ps();
package Test;
sub new {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Jemplate.pm view on Meta::CPAN
Copyright 2006-2014 - Ingy döt Net - All rights reserved.
*/
var Jemplate;
if (typeof(exports) == 'object') {
Jemplate = require("jemplate").Jemplate;
}
if (typeof(Jemplate) == 'undefined')
throw('Jemplate.js must be loaded before any Jemplate template files');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/LWP/Authen/OAuth2/ServiceProvider.pm view on Meta::CPAN
}
sub init {
my ($self, $opts) = @_;
# Now let us consume options. 2 args = required, 3 = defaulted.
# In general subclasses should Just Work.
# need to read this first, since the later opts depend on it
$self->copy_option($opts, 'use_test_urls') if defined $opts->{use_test_urls};
view all matches for this distribution
view release on metacpan or search on metacpan
site/htdocs/static/bwr/angular/angular.js view on Meta::CPAN
function getControllers(directiveName, require, $element, elementControllers) {
var value;
if (isString(require)) {
var match = require.match(REQUIRE_PREFIX_REGEXP);
var name = require.substring(match[0].length);
var inheritType = match[1] || match[3];
var optional = match[2] === '?';
//If only parents then start at the parent element
if (inheritType === '^^') {
site/htdocs/static/bwr/angular/angular.js view on Meta::CPAN
'Controller \'{0}\', required by directive \'{1}\', can\'t be found!',
name, directiveName);
}
} else if (isArray(require)) {
value = [];
for (var i = 0, ii = require.length; i < ii; i++) {
value[i] = getControllers(directiveName, require[i], $element, elementControllers);
}
} else if (isObject(require)) {
value = {};
forEach(require, function(controller, property) {
site/htdocs/static/bwr/angular/angular.js view on Meta::CPAN
}
});
}
beforeEach(function() {
util = require('util');
webdriver = require('selenium-webdriver');
});
// For now, we only test on Chrome,
// as Safari does not load the page with Protractor's injected scripts,
// and Firefox webdriver always disables content security policy (#6358)
view all matches for this distribution
view release on metacpan or search on metacpan
site/htdocs/static/bwr/jquery/dist/jquery.js view on Meta::CPAN
// For CommonJS and CommonJS-like environments where a proper `window`
// is present, execute the factory and get jQuery.
// For environments that do not have a `window` with a `document`
// (such as Node.js), expose a factory as module.exports.
// This accentuates the need for the creation of a real `window`.
// e.g. var jQuery = require("jquery")(window);
// See ticket trac-14549 for more info.
module.exports = global.document ?
factory( global, true ) :
function( w ) {
if ( !w.document ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Lemplate.pm view on Meta::CPAN
lemplate --compile path/to/lemplate/directory/ > myapp/templates.lua
From OpenResty Lua code:
local templates = require "myapp.templates"
ngx.print(templates.process("homepage.tt2", { var1 = 32, var2 = "foo" }))
From the command-line:
lemplate --compile path/to/lemplate/directory/ > myapp/templates.lua
lib/Lemplate.pm view on Meta::CPAN
This will compile all the templates into one Lua module file which can be loaded in your
main OpenResty/Lua application as the module C<myapp.templates>.
Now all you need to do is load the Lua module file in your OpenResty app:
local templates = require "myapp.templates"
and do the HTML page rendering:
local results = templates.process("some-page.tt2",
{ var1 = val1, var2 = val2, ...})
view all matches for this distribution
view release on metacpan or search on metacpan
t/context.t view on Meta::CPAN
BEGIN { use_ok "Lexical::SealRequireHints"; }
BEGIN { unshift @INC, "./t/lib"; }
my $retval;
eval { $retval = require t::context_0; 1 };
is $@, "";
is $retval, "t::context_0 return";
eval { $retval = require t::context_0; 1 };
is $@, "";
is $retval, 1;
eval { $retval = [ require t::context_1 ]; 1 };
is $@, "";
t/context.t view on Meta::CPAN
is $@, "";
sub diecxt() {
die wantarray ? "ARRAY\n" : defined(wantarray) ? "SCALAR\n" : "VOID\n";
}
eval { $retval = require(diecxt()); 1 };
is $@, "SCALAR\n";
eval { $retval = [ require(diecxt()) ]; 1 };
is $@, "SCALAR\n";
eval { require(diecxt()); 1 };
is $@, "SCALAR\n";
view all matches for this distribution
view release on metacpan or search on metacpan
ffi/scanner.c view on Meta::CPAN
if (parser->simple_key_allowed)
{
yaml_simple_key_t simple_key;
simple_key.possible = 1;
simple_key.required = required;
simple_key.token_number =
parser->tokens_parsed + (parser->tokens.tail - parser->tokens.head);
simple_key.mark = parser->mark;
if (!yaml_parser_remove_simple_key(parser)) return 0;
view all matches for this distribution
view release on metacpan or search on metacpan
[AutoPrereqs]
[DynamicPrereqs]
-condition = is_os('MSWin32')
-body = requires('Win32::Locale', 0 )
[Prereqs / Recommended]
-relationship = recommends
Task::Lingua::Any::Numbers = 0.11
view all matches for this distribution
view release on metacpan or search on metacpan
[Prereqs]
[EnsurePrereqsInstalled]
:version = 0.003
type = requires
type = recommends
[GitHub::Meta]
repo = git://github.com/robrwo/Lingua-Conjunction.git
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Lingua/EN/Inflexion/Term.pm view on Meta::CPAN
}
# Conversions to ordinal and cardinal numbers (with module loaded on demand)...
my $num2word = sub {
state $load = require Lingua::EN::Nums2Words && Lingua::EN::Nums2Words::set_case('lower');
Lingua::EN::Nums2Words::num2word(@_);
};
my $num2word_short_ordinal = sub {
state $load = require Lingua::EN::Nums2Words && Lingua::EN::Nums2Words::set_case('lower');
Lingua::EN::Nums2Words::num2word_short_ordinal(@_);
};
my $num2word_ordinal = sub {
state $load = require Lingua::EN::Nums2Words && Lingua::EN::Nums2Words::set_case('lower');
Lingua::EN::Nums2Words::num2word_ordinal(@_);
};
# These words may need an "and" before them...
my $LAST_WORD = qr{
lib/Lingua/EN/Inflexion/Term.pm view on Meta::CPAN
sub cardinal {
my $value = $term_of{ shift() };
my $max_trans = shift();
# Load the necessary module, and compensate for its persnicketiness...
state $load = require Lingua::EN::Words2Nums;
local $SIG{__WARN__} = sub{};
# Make sure we have a number...
$value = Lingua::EN::Words2Nums::words2nums($value) // $value;
lib/Lingua/EN/Inflexion/Term.pm view on Meta::CPAN
sub ordinal {
my $value = $term_of{ shift() };
my $max_trans = shift();
# Load the necessary module, and compensate for its persnicketiness...
state $load = require Lingua::EN::Words2Nums;
local $SIG{__WARN__} = sub{};
# Make sure we have a number...
$value = Lingua::EN::Words2Nums::words2nums($value) // $value;
view all matches for this distribution
view release on metacpan or search on metacpan
t/fibonacci2.t view on Meta::CPAN
require "t/common.pl";
my $expect = join("",<DATA>);
my $buffer = tie *OUT, 'Handle';
select OUT;
my $ok = require "examples/fibonacci2.spl";
select STDOUT;
ok($ok);
is($$buffer,$expect);
__DATA__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Linux/DVB/DVBT/Apps/QuartzPVR/Config/PHP.pm view on Meta::CPAN
# # Include settings into this namespace
# $line = "use PHP;\n" ;
# $line .= "require_php('$php', $namespace);" ;
##$line = '' ;
$line = require_php($php, $namespace);
}
else
view all matches for this distribution