view release on metacpan or search on metacpan
lib/Bio/DB/BioSQL/AnnotationCollectionAdaptor.pm view on Meta::CPAN
=head2 remove_children
Title : remove_children
Usage :
Function: This method is to cascade deletes in maintained objects.
We need to undefine the primary keys of all contained
children objects here.
Example :
lib/Bio/DB/BioSQL/AnnotationCollectionAdaptor.pm view on Meta::CPAN
if($ann->isa("Bio::DB::PersistentObjectI")) {
# undef the PK if this is a child relationship by FK
my $key = $self->_annotation_map_key($annotmap,$ann);
if($annotmap->{$key}->{"link"} eq "child") {
$ann->primary_key(undef);
# cascade through in case the object needs it
$ann->adaptor->remove_children($ann);
}
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/sv40_small.xml view on Meta::CPAN
<secondaryRef db="go" id="GO:0005159" secondary="F:insulin-like growth factor r"/>
<secondaryRef db="go" id="GO:0008269" secondary="F:JAK pathway signal transduct"/>
<secondaryRef db="go" id="GO:0005148" secondary="F:prolactin receptor binding"/>
<secondaryRef db="go" id="GO:0005070" secondary="F:SH3/SH2 adaptor activity"/>
<secondaryRef db="go" id="GO:0006916" secondary="P:anti-apoptosis"/>
<secondaryRef db="go" id="GO:0007259" secondary="P:JAK-STAT cascade"/>
<secondaryRef db="go" id="GO:0045666" secondary="P:positive regulation of neuro"/>
<secondaryRef db="go" id="GO:0040014" secondary="P:regulation of body size"/>
<secondaryRef db="go" id="GO:0001558" secondary="P:regulation of cell growth"/>
<secondaryRef db="go" id="GO:0009966" secondary="P:regulation of signal transdu"/>
<secondaryRef db="interpro" id="IPR000980" secondary="SH2"/>
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/esum_result.xml view on Meta::CPAN
<Item Name="ChrStart" Type="Integer"><ItemContent>27440257</ItemContent></Item>
<Item Name="ChrStop" Type="Integer"><ItemContent>27466653</ItemContent></Item>
</Item>
</Item>
<Item Name="GeneWeight" Type="Integer"><ItemContent>6258</ItemContent></Item>
<Item Name="Summary" Type="String"><ItemContent>The de novo synthesis of pyrimidine nucleotides is required for mammalian cells to proliferate. This gene encodes a trifunctional protein which is associated with the enzymatic activities of the first ...
<Item Name="ChrSort" Type="String"><ItemContent>02</ItemContent></Item>
<Item Name="ChrStart" Type="Integer"><ItemContent>27440257</ItemContent></Item>
</DocSum>
<DocSum>
view all matches for this distribution
view release on metacpan or search on metacpan
Bio/Seq/BaseSeqProcessor.pm view on Meta::CPAN
=head2 close
Title : close
Usage :
Function: Closes the stream. We override this here in order to cascade
to the source stream.
Example :
Returns :
Args : none
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bot/BasicBot.pm view on Meta::CPAN
The quit message. Defaults to "Bye".
=head2 C<ignore_list>
The list of irc nicks to ignore B<public> messages from (normally
other bots.) Useful for stopping bot cascades.
=head2 C<charset>
IRC has no defined character set for putting high-bit chars into channel.
This attribute sets the encoding to be used for outgoing messages. Defaults
view all matches for this distribution
view release on metacpan or search on metacpan
bin/infobot view on Meta::CPAN
The channels we're going to connect to.
=head2 ignore_list
The list of irc nicks to ignore B<public> messages from (normally
other bots). Useful for stopping bot cascades.
=head2 flood
Set to '1' to disable the built-in flood protection of POE::Compoent::IRC
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PBibTk/Main.pm view on Meta::CPAN
}
sub initFileMenu {
my ($self, $mf, $win, $model) = @_;
my $cmd;
$model = $self unless defined $model;
my $mb = $mf->cascade(-label => '~File'); ###, -tearoff => 0);
$cmd = [ $model, 'browsePaperFile' ];
$mb->command(-label => "~Open New Paper", -command => $cmd,
-accelerator => 'Ctrl-O' );
$win->bind('<Control-Key-o>' => $cmd);
lib/PBibTk/Main.pm view on Meta::CPAN
}
sub initBiblioMenu {
my ($self, $mf, $win, $model) = @_;
my $cmd;
$model = $self unless defined $model;
my $mb = $mf->cascade(-label => '~Biblio'); ###, -tearoff => 0);
# $cmd = sub { $model->showSelectedBiblioReference(); };
$cmd = [$model, 'showSelectedBiblioReference'];
$mb->command(-label => 'Show ~Reference', -command => $cmd,
-accelerator => 'Ctrl-R' );
lib/PBibTk/Main.pm view on Meta::CPAN
}
sub initPaperMenu {
my ($self, $mf, $win) = @_;
my $cmd;
my $mb = $mf->cascade(-label => '~Paper');
$cmd = sub { $self->showSelectedPaperReference(); };
$mb->command(-label => 'Show ~Reference', -command => $cmd,
-accelerator => 'Ctrl-T' );
$win->bind('<Control-Key-t>' => $cmd);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/Cart/Generic/Schema/Result/Category.pm view on Meta::CPAN
__PACKAGE__->has_many(
"category_descriptions",
"Business::Cart::Generic::Schema::Result::CategoryDescription",
{ "foreign.category_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 products_to_categories
Type: has_many
lib/Business/Cart/Generic/Schema/Result/Category.pm view on Meta::CPAN
__PACKAGE__->has_many(
"products_to_categories",
"Business::Cart::Generic::Schema::Result::ProductsToCategory",
{ "foreign.category_id" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-05-09 11:58:48
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wYPbDyD6TYFkzTfmL8Fg2w
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/CyberSource/Report.pm view on Meta::CPAN
}
my $object = bless(
# Create a copy of the factory's guts, the object will be a subclass of
# the factory and will be able to use all the information.
# Also, we don't want a change in the factory parameters to cascade to
# the objects previously built, so it makes sense to copy.
# TBD: copy only a selected subset of the content?
Storable::dclone( $self ),
$class,
);
view all matches for this distribution
view release on metacpan or search on metacpan
share/www/static/jquery.js view on Meta::CPAN
values[ index ] = jQuery._data( elem, "olddisplay" );
display = elem.style.display;
if ( show ) {
// Reset the inline display of this element to learn if it is
// being hidden by cascaded rules or not
if ( !values[ index ] && display === "none" ) {
elem.style.display = "";
}
// Set elements which have been overridden with display: none
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/OpenTracing.pm view on Meta::CPAN
# run span should continue
my $root = $plugin->get_scope(CGI_RUN)->get_span;
my $tracer = $plugin->get_tracer();
_cascade_set_failed_spans($tracer, $error, $root);
return;
}
lib/CGI/Application/Plugin/OpenTracing.pm view on Meta::CPAN
return $bootstrapped_tracer;
}
sub _cascade_set_failed_spans {
my ($tracer, $error, $root_span) = @_;
my $root_addr = refaddr($root_span) if defined $root_span;
while (my $scope = $tracer->get_scope_manager->get_active_scope()) {
my $span = $scope->get_span();
lib/CGI/Application/Plugin/OpenTracing.pm view on Meta::CPAN
message => $error,
grep_error_tags( $plugin->get_tags(TRC_ACTIVE_SCOPE) ),
);
my $tracer = $plugin->get_tracer();
_cascade_set_failed_spans($tracer, $error);
die $error;
};
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/ValidateRM.pm view on Meta::CPAN
=head1 MAILING LIST
If you have any questions, comments, bug reports or feature suggestions,
post them to the support mailing list! This the Data::FormValidator list.
To join the mailing list, visit L<http://lists.sourceforge.net/lists/listinfo/cascade-dataform>
=head1 LICENSE
Copyright (C) 2003-2005 Mark Stosberg <mark@summersault.com>
view all matches for this distribution
view release on metacpan or search on metacpan
1.00 Wed Aug 22 04:23:54 2001
- original version; created by h2xs 1.21 with options
-X -n CGI::WebOut
1.01 Sun Mar 31 17:40:00 2002
- cascade (and same) fatal error messages will not duplicate at exit
1.02 Sat Apr 20 19:00:00 2002
- bug in NoCache() with fixed Last-modified (proxy dependent)
1.10 Fri May 24 18:00:00 2002
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CHI/Cascade.pm view on Meta::CPAN
}
sub rule {
my ($self, %opts) = @_;
my $rule = CHI::Cascade::Rule->new( cascade => $self, %opts );
if (ref($rule->{target}) eq 'Regexp') {
push @{ $self->{qr_targets} }, $rule;
}
elsif (! ref($rule->{target})) {
lib/CHI/Cascade.pm view on Meta::CPAN
=head1 SYNOPSIS
use CHI;
use CHI::Cascade;
$cascade = CHI::Cascade->new(chi => CHI->new(...));
$cascade->rule(
target => 'unique_name',
depends => ['unique_name_other1', 'unique_name_other2'],
code => sub {
my ($rule, $target_name, $values_of_depends) = @_;
lib/CHI/Cascade.pm view on Meta::CPAN
return $value;
},
params => { a => 1, b => 2 }
);
$cascade->rule(
target => 'unique_name_other1',
depends => 'unique_name_other3',
code => sub {
my ($rule, $target_name, $values_of_depends) = @_;
lib/CHI/Cascade.pm view on Meta::CPAN
# computing here
return $value;
}
);
$value_of_this_target = $cascade->run('unique_name');
=head1 DESCRIPTION
This module is the attempt to use a benefits of caching and 'make' concept.
If we have many an expensive tasks (a I<computations> or sometimes here used
lib/CHI/Cascade.pm view on Meta::CPAN
This module is experimental yet. I plan to improve it near time but some things
already work. You can take a look for t/* tests as examples.
=head1 CONSTRUCTOR
$cascade = CHI::Cascade->new( %options )
This method constructs a new C<CHI::Cascade> object and returns it.
Key/value pair arguments may be provided to set up the initial state.
Options are:
lib/CHI/Cascade.pm view on Meta::CPAN
B<Optional>. This is B<coderef> for dependence exceptions. If any dependence
from list of L</depends>'s option throws an exception of type
CHI::Cascade::Value by C<die> (for example like this code: C<< die
CHI::Cascade::Value->new->value( { i_have_problem => 1 } ) >> ) then the
C<$cascade> will execute this code as C<< $rule->{depends_catch}->(
$this_rule_obj, $exception_of_dependence, $rule_obj_of_dependence,
$plain_text_target_of_dependence ) >> and you can do into inside a following:
=over
lib/CHI/Cascade.pm view on Meta::CPAN
If exception will be other type this will be propogated onward beyond the
L</run> method
=item to do something
You can make something in this code. After execution of your code the cascade
re-throws original exception of dependence like described above in L<<
/"re-C<die>" >> section.
But please notice that original exception has a status of "thrown from code" so
it can be catched later by other L</depends_catch> callback from other rule
lib/CHI/Cascade.pm view on Meta::CPAN
=back
=item run( $target, %options )
This method makes a cascade computation if need and returns value (value is
cleaned value not L<CHI::Cascade::Value> object!) for this target If any
dependence of this target of any dependencies of dependencies were
(re)computed this target will be (re)computed too.
The run method of instance of cascade can be called from other run method of
same instance and from C<callref> function inside C<depends> rule's option. This
was made possible by creating a separate data instance for each root call of run
method. This can come in handy when you compute dependencies on the go, which
are computed by the same object (instance) of C<cascade>.
=over
=item $target
lib/CHI/Cascade.pm view on Meta::CPAN
=item ttl
A B<scalarref> for getting current TTL for value of 'run' target. The TTL is
"time to live" as TTL in DNS. If any rule in a path of following to dependencies
has ttl parameter then the cascade will do there:
=over
=item 1.
lib/CHI/Cascade.pm view on Meta::CPAN
=item 2.
if rule's target marker already has a upper time and this time in future
the target will be recomputed in this time in future and before this moment you
will get a old data from cache for 'run' target. If this time is there and has
elapsed cascade will use a standard algorithm.
=item 3.
will look up the rule's ttl parameter (min & max ttl values) and will generate
upper time of computation of this rule's target and will return from L</run>
method old data of 'run' target. Next L</run>s executions will return old values
of any targets where this TTL-marked target is as dependence.
=item 4.
In any case if old value misses in cache the cascade will recompute codes.
=back
This feature was made for I<reset> situation. For example if we have 'reset'
rule and all rules depend from this one rule the better way will be to have
lib/CHI/Cascade.pm view on Meta::CPAN
appropriate ones.
=item target_remove ( $target )
It's like a removing of target file in make. You can force to recompute target
by this method. It will remove target marker if one exists and once when cascade
will need target value it will be recomputed. In a during recomputing of course
cascade will return an old value if one exists in cache.
=item stash()
B<Deprecated!> It returns I<hashref> to a stash. A stash is hash for temporary data between
rule's codes. It can be used only from inside L</run>. Example:
$cascade->run( 'target', stash => { key1 => value1 } )
and into rule's code:
# DEPRECATED - OLD METHOD! It's supported and works but please don't use it
$rule->cascade->stash->{key1}
# NEW METHOD:
$rule->stash->{key1}
If a L</run> method didn't get stash hashref the default stash will be as empty
lib/CHI/Cascade.pm view on Meta::CPAN
unique_name_other1 will be recomputed and after the unique_name will be
recomputed.
And even we can have a same rule:
$cascade->rule(
target => qr/^unique_name_(.*)$/,
depends => sub { 'unique_name_other_' . $_[1] },
code => sub {
my ($rule, $target_name, $values_of_depends) = @_;
# $rule->qr_params === ( 3 )
# $target_name == 'unique_name_3' if $cascade->run('unique_name_3') was
# $values_of_depends == {
# unique_name_other_3 => $value_ref_3
# }
}
);
$cascade->rule(
target => qr/unique_name_other_(.*)/,
code => sub {
my ($rule, $target_name, $values_of_depends) = @_;
...
}
);
When we will do:
$cascade->run('unique_name_52');
$cascade will find rule with qr/^unique_name_(.*)$/, will make =~ and will find
a depend as unique_name_other_52
=head1 AUTHOR
This module has been written by Perlover <perlover@perlover.com>
view all matches for this distribution
view release on metacpan or search on metacpan
corpus/dists/Config-GitLike.changes view on Meta::CPAN
* silence lc warnings on undef under perl 5.12 (iarnell@gmail.com)
1.04 - 2010-04-03
* The functionality of Config::GitLike::Cascaded has been folded into
Config::GitLike as a "cascade" option, and the subpackage is now
deprecated. (alexmv)
* Config::GitLike::Git->new->load("/path/to/git") when the path is
lacking a ".git", or is a bare repository, now works. (alexmv)
* Fixed a bug wherein the home directory config file would be loaded
twice, causing all values to be multiple, if that was your cwd.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Mirror/Tiny.pm view on Meta::CPAN
L<cpanm> is an awesome CPAN client. If you want to install modules
in your DarkPAN with cpanm, there are 2 ways.
First way:
cpanm --cascade-search \
--mirror-index /path/to/darkpan/modules/02packages.details.txt \
--mirror /path/to/darkpan \
--mirror http://www.cpan.org \
Your::Module
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/cpanriver.01.build.log view on Meta::CPAN
t/76select.t ........................................ ok
t/77join_count.t .................................... ok
t/78self_referencial.t .............................. ok
t/79aliasing.t ...................................... ok
t/80unique.t ........................................ ok
t/82cascade_copy.t .................................. ok
t/83cache.t ......................................... ok
t/84serialize.t ..................................... ok
t/85utf8.t .......................................... ok
t/86might_have.t .................................... ok
t/86sqlt.t .......................................... skipped: Test needs SQL::Translator >= 0.11018 (see DBIx::Class::Optional::Dependencies for details)
t/data/cpanriver.01.build.log view on Meta::CPAN
t/cdbi/18-has_a.t ................................... skipped: Class::DBI required for this test
t/cdbi/19-set_sql.t ................................. skipped: Class::DBI required for this test
t/cdbi/21-iterator.t ................................ skipped: Class::DBI required for this test
t/cdbi/22-deflate_order.t ........................... skipped: Class::DBI required for this test
t/cdbi/22-self_referential.t ........................ skipped: Class::DBI required for this test
t/cdbi/23-cascade.t ................................. skipped: Class::DBI required for this test
t/cdbi/24-meta_info.t ............................... skipped: Class::DBI required for this test
t/cdbi/26-mutator.t ................................. skipped: Class::DBI required for this test
t/cdbi/30-pager.t ................................... skipped: Class::DBI required for this test
t/cdbi/68-inflate_has_a.t ........................... skipped: Class::DBI required for this test
t/cdbi/70_implicit_inflate.t ........................ skipped: Test needs DateTime >= 0.55, DateTime::Format::SQLite, DateTime::Format::Strptime >= 1.2
t/data/cpanriver.01.build.log view on Meta::CPAN
t/count/grouped_pager.t ............................. ok
t/count/in_subquery.t ............................... ok
t/count/joined.t .................................... ok
t/count/prefetch.t .................................. ok
t/count/search_related.t ............................ ok
t/delete/cascade_missing.t .......................... ok
t/delete/complex.t .................................. ok
t/delete/m2m.t ...................................... ok
t/delete/related.t .................................. ok
t/discard_changes_in_DESTROY.t ...................... ok
t/inflate/core.t .................................... skipped: Inflation tests need DateTime >= 0.55, DateTime::Format::Strptime >= 1.2
t/data/cpanriver.01.build.log view on Meta::CPAN
t/multi_create/m2m.t ................................ ok
t/multi_create/multilev_single_PKeqFK.t ............. ok
t/multi_create/reentrance_count.t ................... skipped: Disable test entirely until multicreate is rewritten in terms of subqueries
t/multi_create/standard.t ........................... ok
t/multi_create/torture.t ............................ ok
t/ordered/cascade_delete.t .......................... ok
t/ordered/unordered_movement.t ...................... ok
t/prefetch/attrs_untouched.t ........................ ok
t/prefetch/correlated.t ............................. ok
t/prefetch/count.t .................................. ok
t/prefetch/diamond.t ................................ ok
view all matches for this distribution
view release on metacpan or search on metacpan
src/panda/basic_string.h view on Meta::CPAN
* The content of other strings which shares the data with current string will not be affected.
* - Reallocate instead of deallocate/allocate when possible, which in many cases is much faster
* - Supports auto convertations between basic_strings with different Allocator template parameter without copying and allocating anything.
* For example any basic_string<...> can be assigned to/from string as if they were of the same class.
*
* All these features covers almost all generic use cases, including creating zero-copy cascade parsers which in other case would lead to a lot of
* pain.
*
* c_str() is not supported, because strings are not null-terminated
*/
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/zx81.asm view on Meta::CPAN
; The Mode 1 Interrupt routine is concerned solely with generating the central
; television picture.
; On the ZX81 interrupts are enabled only during the interrupt routine,
; although the interrupt
; This Interrupt Service Routine automatically disables interrupts at the
; outset and the last interrupt in a cascade exits before the interrupts are
; enabled.
; There is no DI instruction in the ZX81 ROM.
; An maskable interrupt is triggered when bit 6 of the Z80's Refresh register
; changes from set to reset.
; The Z80 will always be executing a HALT (NEWLINE) when the interrupt occurs.
t/data/zx81.asm view on Meta::CPAN
; the 56th border line and then the 192 lines of the central TV picture and,
; although each interrupt interrupts the previous one, there are no stack
; problems as the 'return address' is discarded each time.
;
; The scan line counter in C counts down from 8 to 1 within the generation of
; each text line. For the first interrupt in a cascade the initial value of
; C is set to 1 for the last border line.
; Timing is of the utmost importance as the RH border, horizontal retrace
; and LH border are mostly generated in the 58 clock cycles this routine
; takes .
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CSS/Inliner.pm view on Meta::CPAN
if ($@) {
$self->_report_warning({ info => $@->info() });
next;
}
# CSS rules cascade based on the specificity and order
my $specificity = $self->specificity({ selector => $selector });
#if an element matched a style within the document store the rule, the specificity
#and the actually CSS attributes so we can inline it later
foreach my $element (@{$query_result->get_elements()}) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CSS/Prepare/Manual/Optimising.pod view on Meta::CPAN
applied in these two rules. With optimisation turned on, cssprepare will
output:
div,li{margin:0 5px 1em;}
In this case, the optimisation was beneficial. However, the cascade rules
state that when selectors have equal specificity, the last rule wins. When
optimising CSS, cssprepare can alter the structure of your style sheet so
that rules are in different orders. Take the following example:
.warning { color: orange; }
lib/CSS/Prepare/Manual/Optimising.pod view on Meta::CPAN
to be styled orange instead. See the next section for methods of avoiding this
in your style sheets.
That said, many style sheets will work just fine when optimised, especially
when none of your selectors are ambiguous and rely on this aspect of the
cascade.
=head2 Separate parts of the output
When optimising output, cssprepare first chunks the input into several blocks,
and only optimises within each block. This is so that rule sets within a
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CSS/Simple.pm view on Meta::CPAN
=pod
=head1 NAME
CSS::Simple - Interface through which to read/write/manipulate CSS files while respecting the cascade order
=head1 SYNOPSIS
use CSS::Simple;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CSS/SpriteMaker/Layout/DirectoryBased.pm view on Meta::CPAN
}
);
Layout items based on the directory they are contained in and their filename.
All items contained in the same sub directory are cascaded on the same row of
the layout.
Input hashref items must contain the following keys
for this layout to produce a result:
view all matches for this distribution
view release on metacpan or search on metacpan
t/css-tidy.t view on Meta::CPAN
is ($pseudo_after, $pseudo, "Did not insert a colon after pseudoclasses");
# Bug
#TODO: {
# local $TODO = "Don't insert space in cascaded pseudoclass";
my $cascaded =<<EOF;
.index-off a:hover {
clear: both;
}
EOF
my $cascadedout = tidy_css ($cascaded);
is ($cascadedout, $cascaded, "Don't put space after colon in cascaded");
#};
my $pe =<<EOF;
::selection {
background-color: aliceblue;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CSS/Tiny/Style.pm view on Meta::CPAN
#$style =~ s/^;//; # why why why?
$element->attr('style', $style)
}
###########################################################################################################
# from CSS spec at http://www.w3.org/TR/CSS21/cascade.html#specificity
###########################################################################################################
# A selector's specificity is calculated as follows:
#
# * count the number of ID attributes in the selector (= a)
# * count the number of other attributes and pseudo-classes in the selector (= b)
lib/CSS/Tiny/Style.pm view on Meta::CPAN
my $style = CSS::Tiny::Style->new('h1.menu li.myclass');
print $style->specificity # prints 22
Returns the selector's specificity as described in
L<http://www.w3.org/TR/CSS21/cascade.html#specificity>. A base 100 is
used.
=head3 count_tags
my $style = CSS::Tiny::Style->new('h1.menu li.myclass #foo');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CWB/CEQL/Parser.pm view on Meta::CPAN
query and scripting languages (such as the B<C>ommon B<E>lementary B<Q>uery
B<L>anguage provided by B<CWB::CEQL>) into low-level code (e.g. B<CQP> syntax).
The DPP architecture was motivated by the observation that simplified queries
are often very similar in structure to the corresponding low-level queries,
and that many authors use cascaded regular expression substitutions to
transform one into the other. While such cascades are very easy to write in
Perl and perform efficiently, there are two important limitations: it would
often be useful (i) to validate and transform recursive structures, and (ii)
to restrict a particular transformation to a certain scope. Because of these
limitations, incorrect user input -- and sometimes even correct input -- leads
to malformed low-level queries. Without an intimate knowledge of the
lib/CWB/CEQL/Parser.pm view on Meta::CPAN
=head2 Stand-alone rules
The simplest DPP rules are stand-alone rules that transform their input string
directly without invoking any subrules. These rules typically make use of regular
expression substitutions and correspond to one part of the substitution cascade
in a traditional implementation of simple query languages. In contrast to such
cascades, DPP rules apply only to relevant parts of the input string and cannot
accidentally modify other parts of the simple query. The example below transforms
a search term with shell-style wildcards (C<?> and C<*>) into a regular expression.
Note how the input string is first checked to make sure it does not contain any
other metacharacters that might have a special meaning in the generated regular
expression, and B<die>s with an informative error message otherwise.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cache/Cascade.pm view on Meta::CPAN
For example, caching in a FastMmap based storage is much slower than using a
memory based cache, because pages must be locked to ensure that no corruption
will happen. Likewise Memcached is even more overhead than FastMmap because it
is network bound, and uses blocking IO (on the client side).
This module attempts to make a transparent cascade of caches using several
backends.
The idea is to search from the cheapest backend to the most expensive, and
depending on the options also cache results in the cheaper backends.
The benefits of using a cascade are that if the chance of a hit is much higher
in a slow cache, but checking a cheap cache is negligible in comparison, we
may already have the result we want in the cheap cache. Configure your
expiration policy so that there is approximately an order of magnitude better
probability of cache hits (bigger cache) for each level of the cascade.
=head1 FIELDS
=over 4
lib/Cache/Cascade.pm view on Meta::CPAN
=back
=head1 CAVEATS
When you set or remove a key from the cascade and this propagates downwards, for
example from MemoryCache to FastMmap, other cascades will not notice the change
until their own MemoryCache is expired.
Thus, if cache invalidation is important in your algorithm (data changes) do
not use a cascade. If stale hits are permitted, or the cache is for non
changing data then you should use a cascade.
=head1 SEE ALSO
L<Cache>
view all matches for this distribution
view release on metacpan or search on metacpan
maint/carton_install_with_configuredeps.pl view on Meta::CPAN
my $mirror = Carton::Mirror->new($ENV{PERL_CARTON_MIRROR} || $Carton::Mirror::DefaultMirror);
my $env = Carton::Environment->build($cpanfile_path, $install_path);
my $builder = Carton::Builder->new(
cascade => 1,
mirror => $mirror,
without => \@without,
cpanfile => $env->cpanfile,
);
maint/carton_install_with_configuredeps.pl view on Meta::CPAN
print "Installing configure dependency:- $requirement\n";
$builder->run_cpanm(
'-L', $env->install_path,
(map { ("--mirror", $_->url) } $builder->effective_mirrors),
( $builder->index ? ("--mirror-index", $builder->index) : () ),
( $builder->cascade ? "--cascade-search" : () ),
( $builder->custom_mirror ? "--mirror-only" : () ),
"--save-dists", $env->install_path."/cache",
$builder->groups,
$requirement,
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Carmel/Builder.pm view on Meta::CPAN
if ($self->snapshot) {
my $path = Path::Tiny->tempfile;
$self->snapshot->write_index($path);
unshift @cmd,
"--mirror-index", $path,
"--cascade-search",
"--mirror", "http://cpan.metacpan.org";
}
local $ENV{PERL_CPANM_HOME} = $self->tempdir;
local $ENV{PERL_CPANM_OPT};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Carton/Builder.pm view on Meta::CPAN
package Carton::Builder;
use strict;
use Class::Tiny {
mirror => undef,
index => undef,
cascade => sub { 1 },
without => sub { [] },
cpanfile => undef,
};
sub effective_mirrors {
lib/Carton/Builder.pm view on Meta::CPAN
$self->run_install(
"-L", $path,
(map { ("--mirror", $_->url) } $self->effective_mirrors),
( $self->index ? ("--mirror-index", $self->index) : () ),
( $self->cascade ? "--cascade-search" : () ),
( $self->custom_mirror ? "--mirror-only" : () ),
"--save-dists", "$path/cache",
$self->groups,
"--cpanfile", $self->cpanfile,
"--installdeps", $self->cpanfile->dirname,
view all matches for this distribution