Result:
found 687 distributions and 1334 files matching your query ! ( run in 0.662 )


JavaScript-Embedded

 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



JavaScript-V8-CommonJS

 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


JavaScript-V8-Handlebars

 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


JavaScript-V8-XS

 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


JavaScript-V8

 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


Jemplate

 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


LWP-Authen-OAuth2

 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


Lemonldap-NG-Manager

 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


Lemonldap-NG-Portal

 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


Lemplate

 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


Lexical-SealRequireHints

 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


LibYAML-FFI

 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


Lingua-Any-Numbers

 view release on metacpan or  search on metacpan

dist.ini  view on Meta::CPAN


[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


Lingua-Conjunction

 view release on metacpan or  search on metacpan

dist.ini  view on Meta::CPAN


[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


Lingua-EN-Inflexion

 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


Lingua-Shakespeare

 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


Linux-DVB-DVBT-Apps-QuartzPVR

 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


Linux-Statm-Tiny

 view release on metacpan or  search on metacpan

dist.ini  view on Meta::CPAN

remove = Devel::GlobalDestruction
remove = Mite::Project

[EnsurePrereqsInstalled]
:version = 0.003
type = requires
type = recommends

[GitHub::Meta]
repo = git://github.com/robrwo/Linux-Statm-Tiny.git

 view all matches for this distribution


Linux-Sysfs

 view release on metacpan or  search on metacpan

t/common.pl  view on Meta::CPAN

# strict clean) if CopSTASH_ne(PL_curcop, GvSTASH(dest)), where dest is the SV
# to be copied to returns true. This is the case when the current control ops
# (PL_curcop) namespace doesn't match the namespace of the destination SV..
# See sv.c line 3776 (5.8.8).

my $conf = require 't/config.pl';

my $caller = (caller())[0];
while (my ($key, $val) = each(%{ $conf })) {
    no strict 'refs';
    *{ "${caller}::${key}" } = \$val;

 view all matches for this distribution


List-Gather

 view release on metacpan or  search on metacpan

dist.ini  view on Meta::CPAN

Devel::CallChecker = 0
Devel::CallParser  = 0

[DynamicPrereqs]
:version = 0.018
-body = requires('B::Hooks::EndOfScope') if "$]" < '5.013008';

[MakeMaker::Awesome]
:version = 0.26
header = use lib 'inc';
header = use MMHelper;

 view all matches for this distribution


List-SomeUtils

 view release on metacpan or  search on metacpan

dist.ini  view on Meta::CPAN

Test::LeakTrace = 0
Tie::Array = 0

[DynamicPrereqs]
:version = 0.029
-body = requires('List::SomeUtils::XS', '0.54') if !want_pp() and can_xs();

 view all matches for this distribution


Log-Dispatch-Perl

 view release on metacpan or  search on metacpan

lib/Log/Dispatch/Perl.pm  view on Meta::CPAN

  ''      => sub { undef },

  carp    => $havecarp
               ? \&Carp::carp
               : sub {
                     $havecarp ||= require Carp;
                     $ACTION2CODE{carp}= \&Carp::carp;
                     goto &Carp::carp;
                 },

  cluck   => $] < 5.008
               ? sub {
                     $havecarp ||= require Carp;
                     ( my $m= Carp::longmess() )
                       =~ s#\s+Log::Dispatch::[^\n]+\n##sg;
                     return CORE::warn $_[0] . $m;
                 }
               : sub {
                     $havecarp ||= require Carp;
                     return CORE::warn $_[0] . Carp::longmess();
                 },

  confess => $] < 5.008
               ? sub {
                     $havecarp ||= require Carp;
                     ( my $m = Carp::longmess() )
                       =~ s#\s+Log::Dispatch::[^\n]+\n##sg;
                     return CORE::die $_[0] . $m;
                 }
               : sub {
                     $havecarp ||= require Carp;
                     return CORE::die $_[0] . Carp::longmess();
                 },

  croak   => $havecarp
               ? \&Carp::croak
               : sub {
                     $havecarp ||= require Carp;
                     $ACTION2CODE{croak}= \&Carp::croak;
                     goto &Carp::croak;
                 },

  die     => sub { CORE::die @_ },

 view all matches for this distribution


Log-Dispatch-TAP

 view release on metacpan or  search on metacpan

dist.ini  view on Meta::CPAN


[Prereqs / TestRecommends]

[EnsurePrereqsInstalled]
:version = 0.003
type = requires
type = recommends

[GitHub::Meta]
repo = git://github.com/robrwo/Log-Dispatch-TAP.git

 view all matches for this distribution


Log-Log4perl-Appender-ScreenColoredLevels-UsingMyColors

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN


But, it's more interesting than that. You can load it with C<require>
and call C<arguments> to get the data structure it passes to
C<WriteMakefile>:

	my $package = require '/path/to/Makefile.PL';
	my $arguments = $package->arguments;

Note that C<require>-ing a file makes an entry in C<%INC> for exactly
that name. If you try to C<require> another file with the same name,
even from a different path, C<require> thinks it has already loaded

 view all matches for this distribution


Log-Shiras

 view release on metacpan or  search on metacpan

lib/Log/Shiras/Unhide.pm  view on Meta::CPAN

		$ENV{loaded_filter_util_call} = 1;
		# Check for Filter::Util::Call availability
		warn "Attempting to strip leading qr/###$Log::Shiras::Unhide::strip_match/" if IMPORT_DEBUG;
		my $FILTER_MODULE = "Filter::Util::Call";
		my $require_result;
		eval{ $require_result = require_module( 'Filter::Util::Call' ) };# require_module( $FILTER_MODULE ) };#
		if( $require_result and ($require_result == 1  or $require_result eq $FILTER_MODULE) ) {
			$ENV{loaded_filter_util_call} = 1;
			# Strip the top level script
			Filter::Util::Call::filter_add(
				sub {

 view all matches for this distribution


MHFS-XS

 view release on metacpan or  search on metacpan

miniaudio/miniaudio.h  view on Meta::CPAN

                    framesToReadThisIterationIn = intermediaryBufferCap;
                }

                ma_data_converter_get_required_input_frame_count(&pDevice->playback.converter, framesToReadThisIterationOut, &requiredInputFrameCount);
                if (framesToReadThisIterationIn > requiredInputFrameCount) {
                    framesToReadThisIterationIn = requiredInputFrameCount;
                }

                if (framesToReadThisIterationIn > 0) {
                    ma_device__handle_data_callback(pDevice, pIntermediaryBuffer, NULL, (ma_uint32)framesToReadThisIterationIn);
                }

miniaudio/miniaudio.h  view on Meta::CPAN

        if ((revents & POLLERR) != 0) {
            ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] POLLERR detected.");
            return ma_result_from_errno(errno);
        }

        if ((revents & requiredEvent) == requiredEvent) {
            break;  /* We're done. Data available for reading or writing. */
        }
    }

    return MA_SUCCESS;

miniaudio/miniaudio.h  view on Meta::CPAN

            bps  = caps->enc[iEncoding].bps;
            sig  = caps->enc[iEncoding].sig;
            le   = caps->enc[iEncoding].le;
            msb  = caps->enc[iEncoding].msb;
            format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb);
            if (format != requiredFormat) {
                continue;
            }

            /* Getting here means the format is supported. Iterate over each channel count and grab the biggest one. */
            for (iChannel = 0; iChannel < MA_SIO_NCHAN; iChannel += 1) {

miniaudio/miniaudio.h  view on Meta::CPAN

            bps  = caps->enc[iEncoding].bps;
            sig  = caps->enc[iEncoding].sig;
            le   = caps->enc[iEncoding].le;
            msb  = caps->enc[iEncoding].msb;
            format = ma_format_from_sio_enc__sndio(bits, bps, sig, le, msb);
            if (format != requiredFormat) {
                continue;
            }

            /* Getting here means the format is supported. Iterate over each channel count and grab the biggest one. */
            for (iChannel = 0; iChannel < MA_SIO_NCHAN; iChannel += 1) {

miniaudio/miniaudio.h  view on Meta::CPAN

                    channels = caps->pchan[iChannel];
                } else {
                    channels = caps->rchan[iChannel];
                }

                if (channels != requiredChannels) {
                    continue;
                }

                /* Getting here means we have found a compatible encoding/channel pair. */
                for (iRate = 0; iRate < MA_SIO_NRATE; iRate += 1) {

miniaudio/miniaudio.h  view on Meta::CPAN

                /* Fall back to a best guess. */
                requiredInputFrameCount = (frameCountOutThisIteration * pConverter->resampler.sampleRateIn) / pConverter->resampler.sampleRateOut;
            }

            if (frameCountInThisIteration > requiredInputFrameCount) {
                frameCountInThisIteration = requiredInputFrameCount;
            }
        }
        #endif

        if (pConverter->hasPreFormatConversion) {

miniaudio/miniaudio.h  view on Meta::CPAN

                /* Fall back to a best guess. */
                requiredInputFrameCount = (frameCountOutThisIteration * pConverter->resampler.sampleRateIn) / pConverter->resampler.sampleRateOut;
            }

            if (frameCountInThisIteration > requiredInputFrameCount) {
                frameCountInThisIteration = requiredInputFrameCount;
            }
        }
        #endif


miniaudio/miniaudio.h  view on Meta::CPAN

                        framesToReadThisIterationIn = intermediaryBufferCap;
                    }

                    ma_data_converter_get_required_input_frame_count(&pDecoder->converter, framesToReadThisIterationOut, &requiredInputFrameCount);
                    if (framesToReadThisIterationIn > requiredInputFrameCount) {
                        framesToReadThisIterationIn = requiredInputFrameCount;
                    }

                    if (requiredInputFrameCount > 0) {
                        result = ma_data_source_read_pcm_frames(pDecoder->pBackend, pIntermediaryBuffer, framesToReadThisIterationIn, &framesReadThisIterationIn);
                    } else {

 view all matches for this distribution


MHonArc

 view release on metacpan or  search on metacpan

lib/MHonArc/CharMaps.pm  view on Meta::CPAN

        carp 'Warning: Unknown charset: ', $charset, "\n";
        $map = $self->{'_maps'}{$charset} = {};

    } else {
        delete $INC{$file};
        eval { $map = $self->{'_maps'}{$charset} = require $file; };
        if ($@) {
            carp 'Warning: ', $@, "\n";
            $map = $self->{'_maps'}{$charset} = {};
        }
    }

 view all matches for this distribution


Mac-Errors

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN


But, it's more interesting than that. You can load it with C<require>
and call C<arguments> to get the data structure it passes to
C<WriteMakefile>:

	my $package = require '/path/to/Makefile.PL';
	my $arguments = $package->arguments;

Note that C<require>-ing a file makes an entry in C<%INC> for exactly
that name. If you try to C<require> another file with the same name,
even from a different path, C<require> thinks it has already loaded

 view all matches for this distribution


Mac-OSVersion

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN


But, it's more interesting than that. You can load it with C<require>
and call C<arguments> to get the data structure it passes to
C<WriteMakefile>:

	my $package = require '/path/to/Makefile.PL';
	my $arguments = $package->arguments;

Note that C<require>-ing a file makes an entry in C<%INC> for exactly
that name. If you try to C<require> another file with the same name,
even from a different path, C<require> thinks it has already loaded

 view all matches for this distribution


( run in 0.662 second using v1.01-cache-2.11-cpan-0d8aa00de5b )