App-DuckPAN
view release on metacpan or search on metacpan
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
lib/App/DuckPAN/Query.pm view on Meta::CPAN
# Initialize the main session. Called once by default.
sub _start {
my ($k, $h, $app, $blocks) = @_[KERNEL, HEAP, ARG0, ARG1];
my $history_path = $app->cfg->cache_path->child('query_history');
# Session that handles user input
my $powh_readline = POE::Wheel::ReadLine->new(
InputEvent => '_got_user_input'
);
$powh_readline->bind_key("C-\\", "interrupt");
$powh_readline->read_history($history_path);
$powh_readline->put('(Empty query for ending test)');
# Store in the heap for use in other events
@$h{qw(app blocks console history_path)} = ($app, $blocks, $powh_readline, $history_path);
$k->sig(TERM => '_stop');
# Queue user input event
$k->yield('_get_user_input');
}
lib/App/DuckPAN/Web.pm view on Meta::CPAN
|| qq(DDH.$_=DDH.$_||{};DDH.$_.meta={"tab":"Answer", "id":"$_"};)
} @ids);
my $calls_script = join('', map { q|<script type='text/JavaScript' src='| . $_ . q|'></script>| } @calls_script);
# For now we only allow a single goodie. If that changes, we will do the
# same join/map as with spices.
if(@calls_goodie){
my $goodie = shift @calls_goodie;
$calls_nrj .= "DDG.duckbar.future_signal_tab({signal:'high',from:'$goodie->{id}'});",
# Uncomment following line and remove "setTimeout" line when javascript race condition is addressed
# $calls_script = q|<script type="text/JavaScript">/*DDH.add(| . encode_json($goodie) . q|);*/</script>|;
$calls_script .= q|<script type="text/JavaScript">DDG.ready(function(){ window.setTimeout(DDH.add.bind(DDH, | . encode_json($goodie) . q|), 100)});</script>|;
}
elsif(@calls_fathead){
my $fathead = shift @calls_fathead;
# $calls_nrj .= "DDG.duckbar.future_signal_tab({signal:'high',from:'$fathead->{id}'});",
# Uncomment following line and remove "setTimeout" line when javascript race condition is addressed
# $calls_script = q|<script type="text/JavaScript">/*DDH.add(| . encode_json($fathead) . q|);*/</script>|;
$calls_script .= q|<script type="text/JavaScript">DDG.ready(function(){ window.setTimeout(DDH.add.bind(DDH, | . encode_json($fathead) . q|), 100)});</script>|;
}
else{
$calls_nrj .= @calls_nrj ? join(';', map { "nrj('".$_."')" } @calls_nrj) . ';' : '';
}
my $calls_nrc = @calls_nrc ? join(';', map { "nrc('".$_."')" } @calls_nrc) . ';' : '';
if (%calls_template) {
foreach my $spice_name ( keys %calls_template ){
$calls_script .= join("",map {
my $template_name = $_;
( run in 0.745 second using v1.01-cache-2.11-cpan-2398b32b56e )