view release on metacpan or search on metacpan
AI_DOCS/SINGLE_FILE_DATADIR.md view on Meta::CPAN
## Can Regular Users Mount It?
- Plain `mount` of a disk image: **no** â needs root, or a pre-configured
`/etc/fstab` entry with the `user` option.
- **FUSE: yes** â `squashfuse`, `fuse2fs`, `fuse-overlayfs` all run unprivileged
(where FUSE is permitted, which is the Linux default).
## Recommended Stack (rootless, read-only base + ephemeral writes)
1. Build the data dir once (`initdb` / mysql install / load schema + seed data).
AI_DOCS/SINGLE_FILE_DATADIR.md view on Meta::CPAN
mksquashfs datadir/ db.sqfs
```
3. At use time, fully rootless:
```
squashfuse db.sqfs /mnt/lower
fuse-overlayfs -o lowerdir=/mnt/lower,upperdir=/tmp/up,workdir=/tmp/work /mnt/merged
postgres -D /mnt/merged # or: mysqld --datadir=/mnt/merged
```
Reads hit the immutable squashfs file. Writes (WAL, pid, locks) land in the
tmpfs upper layer. Base file never changes â shareable across runs.
Alternative to `fuse-overlayfs`: user namespace + kernel overlayfs (rootless on
modern kernels):
```
unshare -Urm
mount -t overlay overlay -o lowerdir=/mnt/lower,upperdir=/tmp/up,workdir=/tmp/work /mnt/merged
```
## DB-Specific Shortcuts (skip the overlay)
### MySQL â has a real read-only mode
Run straight off the squashfuse mount, redirect writable bits elsewhere:
```
mysqld --datadir=/mnt/lower \
AI_DOCS/SINGLE_FILE_DATADIR.md view on Meta::CPAN
--socket=/tmp/x.sock \
--tmpdir=/tmp
```
### PostgreSQL â no clean read-only datadir
Use the overlay approach. Hacks via `hot_standby` / recovery mode exist but are
fragile. Overlay is simplest and robust.
## Fit for DBIx::QuickDB
Strong fit: pre-seed schema once â squashfs â spin throwaway test DBs fast via
overlay. Base file is immutable and shared across runs, so spin-up is copy-free
and fast. Candidate feature: a driver method that packs a built data dir into a
squashfs file and mounts it (squashfuse + fuse-overlayfs) on launch.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/ResultSet.pm view on Meta::CPAN
my $old_rs = $connector->resultset('users')->search({ status => 0 });
my $new_rs = $old_rs->search({ age > 18 });
print 'Disabled adults: ' . $new_rs->count() . "\n";
Returns a new result set object that overlays the passed in where clause
on top of the old where clause, creating a new result set. The original
result set's where clause is left unmodified.
search() never executes SQL queries. You can call search() as many times
as you like and iteratively build a resultset as much as you want, but no
view all matches for this distribution
view release on metacpan or search on metacpan
timetheese/tpl/stackoverflow_homepage.html view on Meta::CPAN
</head>
<body class="home-page">
<noscript><div id="noscript-padding"></div></noscript>
<div id="notify-container"></div>
<div id="overlay-header"></div>
<div id="custom-header"></div>
<div class="container">
<div id="header">
<div id="portalLink">
view all matches for this distribution
view release on metacpan or search on metacpan
public/css/bootstrap-3/bootstrap.css.map view on Meta::CPAN
{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer2/Plugin/LiteBlog/Scaffolder/Data.pm view on Meta::CPAN
align-items: center;
background-size: cover;
background-position: center;
max-width: 100%;
border-radius: 5px;
position: relative; /* Needed for the overlay and for the meta's absolute positioning */
margin-bottom: 20px;
}
.post-header::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6); /* Black overlay to ensure text readability */
z-index: 1;
}
.post-header .header-content {
flex-grow: 1;
lib/Dancer2/Plugin/LiteBlog/Scaffolder/Data.pm view on Meta::CPAN
background: #f0f0f0; /* Light background */
color: #333; /* Darker text color for better contrast on light bg */
}
/* Override the dark overlay when no featured image */
.post-header.no-featured-image::before {
background: rgba(255, 255, 255, 0); /* Transparent overlay */
}
/* Adjust the title color for better readability on light background */
.post-header.no-featured-image .post-title {
color: #333;
view all matches for this distribution
view release on metacpan or search on metacpan
share/assets/dash_core_components/async~plotlyjs.js view on Meta::CPAN
(window.webpackJsonpdash_core_components=window.webpackJsonpdash_core_components||[]).push([[5],{685:function(t,e){!function(r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define([],r):("undefined"!=typeof windo...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Annotation.pm view on Meta::CPAN
sub inflate_chains ($self) {
$self->_chain_for($_) for $self->chains_list;
return $self;
}
sub overlay_cloak ($self, $data, %opts) {
return Data::Annotation::Overlay->new(under => $data, %opts);
}
sub evaluate ($self, $chain, $data) {
$chain = $self->default_chain unless $self->has_chain_for($chain);
# cloak the input $data with an Overlay, unless it's already an
# overlay in which case it's used directly
$data = $self->overlay_cloak($data,
value_if_missing => '',
value_if_undef => '',
) unless blessed($data) && $data->isa('Data::Annotation::Overlay');
my @call_sequence;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Overlay.pm view on Meta::CPAN
# Data::Dumper lazy loaded when debugging
our $VERSION = '0.54';
$VERSION = eval $VERSION; ## no critic
our @EXPORT = qw(overlay);
our @EXPORT_OK = qw(overlay overlay_all compose combine_with);
=head1 NAME
Data::Overlay - merge/overlay data with composable changes
=head1 VERSION
Data::Overlay version 0.54 - ALPHA, no compatibility promises, seriously
lib/Data/Overlay.pm view on Meta::CPAN
#!perl -s
#line 31
use strict; use warnings;
use Data::Overlay qw(overlay compose);
use Data::Dumper;
$Data::Dumper::Sortkeys = 1;
my $data_structure = {
a => 123,
lib/Data/Overlay.pm view on Meta::CPAN
},
);
# apply %changes to $data_structure (read-only ok),
# returning a new data structure sharing unchanged data with the old
my $new_data_structure = overlay($data_structure, \%changes);
# Note sharing shown by Dumper
print Dumper($data_structure, \%changes, $new_data_structure);
__END__
lib/Data/Overlay.pm view on Meta::CPAN
=head1 DESCRIPTION
=head2 Basic Idea
The overlay functions can be used to apply a group of changes
(also called an overlay) to a data structure, non-destructively,
returning a shallow-ish copy with the changes applied.
"Shallow-ish" meaning shallow copies at each level along
the path of the deeper changes.
$result = overlay($original, $overlay);
The algorithm walks the overlay structure, either taking
values from it, or when nothing has changed, retaining the
values of the original data structure. This means that the
only the overlay fully traversed.
When the overlay is doesn't use any special Data::Overlay
keys (ones starting with "="), then the result will be
the merger of the original and the overlay, with the overlay
taking precedence. In particular, only hashes will really
be merged, somewhat like C<< %new = (%defaults, %options) >>,
but recursively. This means that array refs, scalars, code,
etc. will be replace whatever is in the original, regardless
of the original type (so an array in the overlay will take
precedence over an array, hash or scalar in the original).
That's why it's not called Data::Underlay.
Any different merging behaviour needs to be marked with
special keys in the overlay called "actions". These start
with an "=" sign. (Double it in the overlay to have an actual
leading "=" in the result). The actions are described below,
but they combine the original and overlay in various ways,
pushing/unshifting arrays, only overwriting false or undefined,
up to providing ability to write your own combining callback.
=head2 Reference Sharing
Data::Overlay tries to minimize copying and so will try
to share references between the new structure and the old structure
and overlay. This means that changing any of these is likely
to produce unintended consequences. This sharing is only
practical when the data structures are either read-only or
cloned immediately after overlaying (Cloner not included).
=head1 GLOSSARY
overlay
v : put something on top of something else
n : layer put on top of something else
$ds, $old_ds, $new_ds - arbitrary, nested Perl data-structures
lib/Data/Overlay.pm view on Meta::CPAN
return reftype($maybe_ref) && reftype($maybe_ref) eq $type;
}
=head1 INTERFACE
=head2 overlay
$new_ds = overlay($old_ds, $overlay);
Apply an overlay to $old_ds, returning $new_ds as the result.
$old_ds is unchanged. $new_ds may share references to parts
of $old_ds and $overlay (see L<Reference Sharing>). If this isn't desired
then clone $new_ds.
=cut
sub overlay {
my ($ds, $overlay, $conf) = @_;
$conf ||= $default_conf;
if (_isreftype(HASH => $overlay)) {
# trivial case: overlay is {}
if (!keys %$overlay) { # empty overlay
return $ds; # leave $ds alone
}
# = is action (== is key with leading = "escaped")
my ($overlay_keys, $actions, $escaped_keys) =
part { /^(==?)/ && length $1 } keys %$overlay;
# part might leave undefs
$_ ||= [] for ($overlay_keys, $actions, $escaped_keys);
# 0-level $ds copy for actions that operate on $new_ds as a whole
# ($new_ds need not be a HASH here)
my $new_ds = $ds; # don't use $ds anymore, $new_ds instead
# apply each action in order to $new_ds, sequentially
# (note that some items really need to nest inner overlays
# to be useful, eg. config applies only in a dynamic scope
# to children under "data", not to peers)
for my $action_key (_sort_actions($actions, $conf)) {
my ($action) = ($action_key =~ /^=(.*)/);
my $callback = $conf->{action_map}{$action};
die "No action '$action' in action_map" unless $callback;
$new_ds = $callback->($new_ds, $overlay->{$action_key}, $conf);
}
# return if there are only actions, no plain keys
# ( important for overlaying scalars, eg. a: 1 +++ a: =defor 1 )
return $new_ds unless @$overlay_keys || @$escaped_keys;
# There are non-action keys in overlay, so insist on a $new_ds hash
# (Shallow copy $new_ds in case it is a reference to $ds)
if (_isreftype(HASH => $new_ds)) {
$new_ds = { %$new_ds }; # shallow copy
} else {
$new_ds = {}; # $new_ds is not a HASH ($ds wasn't), must become one
}
# apply overlay_keys to $new_ds
for my $key (@$overlay_keys) {
$new_ds->{$key} =
overlay($new_ds->{$key}, $overlay->{$key}, $conf);
}
# apply any escaped_keys in overlay to $new_ds
for my $escaped_key (@$escaped_keys) {
my ($actual_key) = ($escaped_key =~ /^=(=.*)/);
$new_ds->{$actual_key} =
overlay($new_ds->{$actual_key}, $overlay->{$escaped_key}, $conf);
}
return $new_ds;
} else {
# all scalars, blessed and non-HASH overlay elements are 'overwrite'
# (by default, you could intercept all and do other things...)
my $callback = $conf->{action_map}{overwrite};
die "No action 'overwrite' in action_map" unless $callback;
return $callback->($ds, $overlay, $conf);
}
confess "A return is missing somewhere";
}
=head2 overlay_all
$new_ds = overlay_all($old_ds, $overlay1, $overlay2, ...);
Apply several overlays to $old_ds, returning $new_ds as the result.
They are logically applied left to right, that is $overlay1,
then overlay2, etc. (Internally C<compose> is used, see next)
=cut
sub overlay_all {
my ($ds, @overlays) = @_;
return overlay($ds, compose(@overlays));
}
=head2 compose
$combined_overlay = compose($overlay1, $overlay2, ..);
Produce an overlay that has the combined effect of applying
$overlay1 then $overlay2, etc.
=cut
sub compose {
my (@overlays) = @_;
# rubbish dumb merger XXX
return { '=seq' => \@overlays };
}
=head2 combine_with
$combiner_sub = combine_with { $a && $b };
my $conf = { action_map => {
and => $combiner_sub
} };
my $new = overlay($this, $that, $conf);
Utility to build simple overlay actions. For example, the included
"or" is just:
combine_with { $a || $b};
$a is the old_ds parameter, $b is the overlay parameter.
@_ contains the rest of the arguments.
=cut
#$action_map{defor} = combine_with { $a // $b};
sub combine_with (&@) { ## no critic
my ($code) = shift;
return sub {
local ($a) = shift; # $old_ds
local ($b) = shift; # $overlay
return $code->(@_); # $conf (remainder of args in @_)
};
}
=head2 Actions
lib/Data/Overlay.pm view on Meta::CPAN
=item config
=cut
$action_map{config} = sub {
my ($old_ds, $overlay, $old_conf) = @_;
#my $new_conf = overlay($old_conf, $overlay->{conf}, $old_conf);
# do we really want a config here XXX?
my $new_conf = overlay($old_conf, $overlay->{conf}); # eat dogfood #1
# wrap all actions with debug if needed
if (!defined $old_conf->{debug}
&& $new_conf->{debug} ) {
# XXX overlay action_map, eat dogfood #2
my $old_action_map = $new_conf->{action_map};
my $new_action_map;
my @actions = keys %$old_action_map;
if ($new_conf->{debug_actions}) {
lib/Data/Overlay.pm view on Meta::CPAN
_wrap_debug($action, $old_action_map->{$action});
}
$new_conf->{action_map} = $new_action_map;
}
return overlay($old_ds, $overlay->{data}, $new_conf);
};
=item overwrite
"Overwrite" the old location with the value of the overwrite key.
This is the default action for non-HASH overlay elements.
(The actual action used in this implicit case and also
the explicit case is $conf->{action_map}{overwrite},
so it can be overriden).
You can also use C<overwrite> explicitly, to overlay an empty
hash (which would otherwise be treated as a keyless, no-op overlay):
overlay(undef, {}); # -> undef
overlay(undef, {'=overwrite'=>{}}); # -> {}
=cut
$action_map{overwrite} = sub {
my ($old_ds, $overlay, $conf) = @_;
return $overlay;
};
=item defaults
=cut
$action_map{defaults} = sub {
my ($old_ds, $overlay, $conf) = @_;
if ( _isreftype(HASH => $old_ds)
&& _isreftype(HASH => $overlay) ) {
my %new_ds = %$old_ds; # shallow copy
for (keys %$overlay) {
$new_ds{$_} //= $overlay->{$_};
}
return \%new_ds;
} else {
return $old_ds // $overlay; # only HASHes have defaults
}
};
=item delete
=cut
$action_map{delete} = sub {
my ($old_ds, $overlay, $conf) = @_;
if ( _isreftype(HASH => $old_ds)
&& _isreftype(HASH => $overlay)) {
# overlay is a set of keys to "delete"
my %new_ds = %$old_ds;
delete $new_ds{$_} for (keys %$old_ds);
return \%new_ds;
} elsif ( _isreftype(ARRAY => $old_ds)
&& _isreftype(ARRAY => $overlay)) {
# overlay is a list of indices to "delete"
my @new_ds = @$old_ds;
delete $new_ds[$_] for (@$old_ds);
return \@new_ds;
} else {
warn "Container mismatch (ew XXX)";
return overlay($old_ds, $overlay, $conf);
}
};
=item defor
Defined or (//) is used to combine the original and overlay
=cut
$action_map{defor} = combine_with { $a // $b};
lib/Data/Overlay.pm view on Meta::CPAN
=item push
=cut
$action_map{push} = sub {
my ($old_ds, $overlay) = @_;
# flatten 1 level of ARRAY
my @overlay_array = _isreftype(ARRAY => $overlay)
? @$overlay : $overlay;
if (_isreftype(ARRAY => $old_ds)) {
return [ @$old_ds, @overlay_array ];
} else {
return [ $old_ds, @overlay_array ]; # one elem array
}
};
=item unshift
=cut
$action_map{unshift} = sub {
my ($old_ds, $overlay) = @_;
# flatten 1 level of ARRAY
my @overlay_array = _isreftype(ARRAY => $overlay)
? @$overlay : $overlay;
if (_isreftype(ARRAY => $old_ds)) {
return [ @overlay_array, @$old_ds ];
} else {
return [ @overlay_array, $old_ds ]; # one elem array
}
};
=item pop
=cut
$action_map{pop} = sub {
my ($old_ds, $overlay) = @_;
if (_isreftype(ARRAY => $old_ds)) {
if (_isreftype(ARRAY => $overlay)) {
# if pop's arg is ARRAY, use it's size
# as the number of items to pop
# (for symmetry with push)
my $pop_size = @$overlay;
return [ @{$old_ds}[0..$#$old_ds-$pop_size] ];
} else {
return [ @{$old_ds}[0..$#$old_ds-1] ];
}
} else {
lib/Data/Overlay.pm view on Meta::CPAN
=item shift
=cut
$action_map{shift} = sub {
my ($old_ds, $overlay) = @_;
if (_isreftype(ARRAY => $old_ds)) {
if (_isreftype(ARRAY => $overlay)) {
# if pop's arg is ARRAY, use it's size
# as the number of items to pop
# (for symmetry with push)
my $shift_size = @$overlay;
return [ @{$old_ds}[$shift_size..$#$old_ds] ];
} else {
return [ @{$old_ds}[1..$#$old_ds] ];
}
} else {
lib/Data/Overlay.pm view on Meta::CPAN
}
=cut
$action_map{run} = sub {
my ($old_ds, $overlay) = @_;
return $overlay->{code}->($old_ds, @{ $overlay->{args} || [] });
};
=item foreach
Apply one overlay to all elements of an array or values of a hash
(or just a scalar). Often useful with =run if the overlay is
a function of the original value.
=cut
# XXX each with (k,v) or [i,...]
$action_map{foreach} = sub {
my ($old_ds, $overlay, $conf) = @_;
if (_isreftype(ARRAY => $old_ds)) {
return [
map { overlay($_, $overlay, $conf) } @$old_ds
];
} elsif (_isreftype(HASH => $old_ds)) {
return {
map {
$_ => overlay($old_ds->{$_}, $overlay, $conf)
} keys %$old_ds
};
} else {
return overlay($old_ds, $overlay, $conf);
}
};
=item seq
Apply in sequence an array of overlays.
=cut
$action_map{seq} = sub {
my ($old_ds, $overlay, $conf) = @_;
# XXX reftype $overlay
my $ds = $old_ds;
for my $ol (@$overlay) {
$ds = overlay($ds, $ol, $conf);
}
return $ds;
};
=back
=cut
for my $action (keys %action_map) {
# debuggable names for callbacks (not the used perl names)
subname "$action-overlay", $action_map{$action};
# XXX
warn "$action not in \@action_order"
if ! grep { $action eq $_ } @action_order;
}
sub _wrap_debug {
my ($action_name, $inner_sub) = @_;
my $s = subname "$action_name-debug", sub {
my ($old_ds, $overlay, $conf) = @_;
my $debug = max($conf->{debug},
( ref($conf->{debug_actions})
&& $conf->{debug_actions}{$action_name} ));
if ($debug) {
warn "Calling $action_name $inner_sub\n";
warn " with ", _dt($overlay), "\n" if $debug >= 1;
warn " conf ", _dt({map { "$_" } %$conf}), "\n" if $debug >= 2;
cluck " CALL STACK" if $debug >= 3;
}
my $result = $inner_sub->($old_ds, $overlay, $conf);
if ($debug) {
warn " Back from $action_name\n";
warn " got ", _dt($result), "\n" if $debug >= 2;
}
return $result;
lib/Data/Overlay.pm view on Meta::CPAN
+/-/*/++/--/x/%/**/./<</>>
| & ^ ~ masks boolean logic
conditionals? comparison?
deref?
invert apply inverted
swap overlay and ds roles
splitting one ds val into multiple new_ds?
regex matching and extraction
pack/unpack
const?
Objects?
lib/Data/Overlay.pm view on Meta::CPAN
Some made up use-cases.
=head2 Configuration Data Merging
overlay_all($defaults, $host_conf, $app_conf, $user_conf, $cmd_line_conf);
=head2 List of Undoable Edits
Use the memory sharing to keep a sequence of persistent data structures.
"Persistent" in the functional programming sense, you can
access (read-only) old and new versions.
=head2 Circular References in Overlays
There is no protection against reference cycles in overlays.
L<Devel::Cycle> or L<Data::Structure::Util> may help.
=head2 Unsharing Data with Clone
If you don't want any sharing of data between the result and
source or overlay, then use a clone.
Either L<Storable>'s dclone or L<Clone>
$new_clone = dclone(overlay($old, $overlay));
=head2 Escaping "=" Keys
Rmap
lib/Data/Overlay.pm view on Meta::CPAN
Uses special characters to indicate the action performed. Also permits
local config overrides and extensions.
=back
Potential overlay builders, modules that could be used to build
overlays for data:
=over
=item * L<CGI::Expand>
Build nested hashes from a flat path hash:
use CGI::Expand qw(expand_hash);
my $overlay = expand_hash({"a.b.c"=>1,"a.b.d"=>[2,3]})
# = {'a' => {'b' => {'c' => 1,'d' => [1,2,3]}}};
L<Hash::Flatten> also has an unflatten function.
=back
lib/Data/Overlay.pm view on Meta::CPAN
but there's nothing particularly concurrent about Data::Overlay.
Also, patches and operations have more context and are invertible.
=head1 KEYWORDS
Merge, edit, overlay, clone, modify, transform, memory sharing, COW,
operational transform, patch.
So an SEO expert walks into a bar, tavern, pub...
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
README
lib/Data/Pack.pm
t/00-compile.t
t/000-report-versions.t
t/01_misc.t
t/02_hash_overlay.t
t/author-critic.t
t/perlcriticrc
t/release-check-changes.t
t/release-dist-manifest.t
t/release-distmeta.t
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/ParseBinary/Executable/PE32.pm view on Meta::CPAN
ULInt16("exe_stackptr"),
ULInt16("checksum"),
ULInt16("exe_ip"),
ULInt16("relocation_codeseg"),
ULInt16("table_offset"),
ULInt16("overlay"),
Padding(8),
ULInt16("oem_id"),
ULInt16("oem_info"),
Padding(20),
ULInt32("coff_header_pointer"),
view all matches for this distribution
view release on metacpan or search on metacpan
share/dictionary.txt view on Meta::CPAN
overlands
overlap
overlapped
overlapping
overlaps
overlay
overlaying
overlays
overlie
overlies
overload
overloaded
overloading
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Password/zxcvbn/RankedDictionaries/English.pm view on Meta::CPAN
'overland' => 7827,
'overlap' => 6647,
'overlapped' => 16219,
'overlapping' => 8019,
'overlaps' => 12465,
'overlay' => 14285,
'overlays' => 26767,
'overloading' => 29998,
'overlooking' => 5411,
'overlooks' => 10741,
'overlord' => 12146,
'overlords' => 23708,
view all matches for this distribution
view release on metacpan or search on metacpan
xt/fs_portability.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use File::Temp qw(tempdir);
# File-backed pool on multiple filesystems. Certain FS (overlayfs on old
# kernels, some NFS) reject mmap flags or flock semantics.
use Data::Pool::Shared;
my %fs_points = (
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Random/Contact/Language/EN.pm view on Meta::CPAN
overlands
overlap
overlapped
overlapping
overlaps
overlay
overlaying
overlays
overlie
overlies
overload
overloaded
overloading
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Random/dict view on Meta::CPAN
overland
overlap
overlapped
overlapping
overlaps
overlay
overlaying
overlays
overload
overloaded
overloading
overloads
overlook
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/SmartMunge.pm view on Meta::CPAN
our @EXPORT_OK = @{ $EXPORT_TAGS{all} = [ map { @$_ } values %EXPORT_TAGS ] };
my %munger_dispatch = (
STRING_CODE => sub { $_[1]->($_[0]) },
ARRAY_CODE => sub { $_[1]->($_[0]) },
HASH_CODE => sub { $_[1]->($_[0]) },
HASH_HASH => sub { +{ %{ $_[0] }, %{ $_[1] } } }, # overlay
);
sub smart_munge {
my ($data, $munger) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/UUID/MT.pm view on Meta::CPAN
The UUID follows the "version 4" spec, with 122 pseudo-random bits and
6 mandated bits ("variant" field and "version" field).
=head2 Version 4s UUIDs
This is a custom UUID form that resembles "version 4" form, but that overlays
the first 60 bits with a timestamp akin to "version 1", Unlike "version 1",
this custom version preserves the ordering of bits from high to low, whereas
"version 1" puts the low 32 bits of the timestamp first, then the middle 16
bits, then multiplexes the high bits with version field. This "4s" variant
provides a "sequential UUID" with the timestamp providing order and the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DataExtract/FixedWidth.pm view on Meta::CPAN
isa => 'Bool'
, is => 'ro'
, default => 1
);
has 'fix_overlay' => (
isa => 'Bool'
, is => 'ro'
, default => 0
);
lib/DataExtract/FixedWidth.pm view on Meta::CPAN
#printf "\nData:|%s|\tHeader:|%s|", $data, $self->header_row;
my @cols = unpack ( $self->unpack_string, $data );
## If we bleed over a bit we can fix that.
if ( $self->fix_overlay ) {
foreach my $idx ( 0 .. $#cols ) {
if (
$cols[$idx] =~ m/\S+$/
&& exists $cols[$idx+1]
&& $cols[$idx+1] =~ s/^(\S+)//
lib/DataExtract/FixedWidth.pm view on Meta::CPAN
=item ->trim_whitespace(*1|0)
Trim the whitespace for the elements that C<-E<gt>parse($line)> outputs.
=item ->fix_overlay(1|0*)
Fixes columns that bleed into other columns, move over all non-whitespace characters preceding the first whitespace of the next column. This does not work with heurisitic because the unpack string makes the assumption the data is not mangeled.
So if ColumnA as is 'foob' and ColumnB is 'ar Hello world'
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Date/Manip/DM5.pm view on Meta::CPAN
# upside down characters
$$hash{"ud!"} = "\xa1"; # INVERTED EXCLAMATION MARK
$$hash{"ud?"} = "\xbf"; # INVERTED QUESTION MARK
# overlay characters
$$hash{"X o"} = "\xa4"; # CURRENCY SIGN
$$hash{"Y ="} = "\xa5"; # YEN SIGN
$$hash{"S o"} = "\xa7"; # SECTION SIGN
$$hash{"O c"} = "\xa9"; # COPYRIGHT SIGN Copyright
view all matches for this distribution
view release on metacpan or search on metacpan
2.02 Wed Dec 24 06:02:53 CET 2008
- mark hidden mapspaces visually with a question mark.
- make hidden spaces as light as the darkest normal spaces.
- don't lie about the window size anymore in fear of crashing
the server (as we are dealing with deliantra servers only these days).
- correctly draw the speech bubbles and other overlays even when the
topmost face isn't visible.
- fix swirly tile draw offset.
- fix a crash when the user clicks on the map during log-in.
- incorporate tips of the day by botz (former madness).
- handle failure to load a music face more gracefully (still
view all matches for this distribution
view release on metacpan or search on metacpan
Deliantra.pm view on Meta::CPAN
range_modifier duration_modifier dam_modifier gen_sp_armour
move_type move_block move_allow move_on move_off move_on move_slow move_slow_penalty
alive wiz was_wiz applied unpaid can_use_shield no_pick is_animated monster
friendly generator is_thrown auto_apply treasure player sold see_invisible
can_roll overlay_floor is_turnable is_used_up identified reflecting changing
splitting hitback startequip blocksview undead scared unaggressive
reflect_missile reflect_spell no_magic no_fix_player is_lightable tear_down
run_away pick_up unique no_drop can_cast_spell can_use_scroll can_use_range
can_use_bow can_use_armour can_use_weapon can_use_ring has_ready_range
has_ready_bow xrays is_floor lifesave no_strength sleep stand_still
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/PerlySense/external/emacs/perly-sense-test-class.el view on Meta::CPAN
(goto-char (point-min))
(and (search-forward-regexp (format " *sub +%s[^_a-z0-9]" sub-name) (point-max) t)
(match-beginning 0)))))
sub-pos))
(defvar ps/tc/current-method-overlay nil
"The overlay for the current method ")
(make-variable-buffer-local 'ps/tc/current-method-overlay)
(defun ps/tc/redisplay-method (method-name)
(remove-overlays (point-min) (point-max) 'test-class-method t)
(let ((sub-pos (ps/sub-pos method-name)))
(if sub-pos
(progn
(setq ps/tc/current-method-overlay (make-overlay sub-pos sub-pos))
(overlay-put ps/tc/current-method-overlay 'test-class-method t)
(overlay-put ps/tc/current-method-overlay 'before-string
(propertize "Test::Class --> " 'face 'font-lock-comment-face))
))))
(global-set-key (format "%stm" ps/key-prefix) 'ps/tc/toggle-current-sub)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/SizeMe/Graph/static/excanvas.js view on Meta::CPAN
canvasElement.clientHeight + 'px;overflow:hidden;position:absolute';
var el = canvasElement.ownerDocument.createElement('div');
el.style.cssText = cssText;
canvasElement.appendChild(el);
var overlayEl = el.cloneNode(false);
// Use a non transparent background.
overlayEl.style.backgroundColor = 'red';
overlayEl.style.filter = 'alpha(opacity=0)';
canvasElement.appendChild(overlayEl);
this.element_ = el;
this.arcScaleX_ = 1;
this.arcScaleY_ = 1;
this.lineScale_ = 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Developer/Dashboard.pm view on Meta::CPAN
action execution with trusted and safer page boundaries
=item *
config-backed providers, path aliases, and compose overlays
=item *
update scripts and installable runtime packaging
lib/Developer/Dashboard.pm view on Meta::CPAN
controlled bootstrap and upgrade path.
=item * Docker Compose Resolver
C<Developer::Dashboard::DockerCompose> resolves project-aware compose files,
explicit overlay layers, services, addons, modes, env injection, and the
final C<docker compose> command so container workflows can live inside the
same dashboard ecosystem instead of in separate wrapper scripts.
=back
lib/Developer/Dashboard.pm view on Meta::CPAN
immediately.
The browser editor now loads one visible block per bookmark section while it
keeps the canonical separator-based bookmark source in a hidden form field for
saves and play requests. Each visible block still uses the syntax-highlighted
overlay viewport that follows the real textarea scroll position by transform
instead of a second scrollbox, so long lines, full-text selection, and caret
placement stay aligned with the real editor. Pressing C<Tab> inside one block
starts the next section block, and the browser recomposes those blocks back
into the original separator-line bookmark document before it posts or plays
the page. The directive assist still understands C<:---> when you paste older
lib/Developer/Dashboard.pm view on Meta::CPAN
C<--service>, C<--addon>, C<--mode>, C<--project>, and C<--dry-run> are
consumed first, and all remaining docker compose flags such as C<-d> and
C<--build> pass straight through to the real C<docker compose> command.
If one resolved service comes from an installed skill docker root, the
resolver also loads that skill's F<E<lt>skill-rootE<gt>/.env> file into the compose
environment before docker-config, addon, and mode env overlays are applied.
Only skills whose compose service files actually participate are included,
disabled skills are skipped, and F<E<lt>skill-rootE<gt>/.env.pl> is not executed from
this compose path. Nested skill services expand their env chain from the root
nested skill to the participating leaf service, preserving overwritten parent
keys under cumulative aliases such as C<foo_VERSION> and
lib/Developer/Dashboard.pm view on Meta::CPAN
=back
Collector definitions come only from dashboard configuration JSON, so config
remains the single source of truth for path aliases, providers, collectors,
and Docker compose overlays.
=head2 Testing And Coverage
Run the test suite:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Modbus.pm view on Meta::CPAN
=back
Note that discrete outputs are called coils as well. This name makes reference to the automation origin of the protocol, where a coil is the actuator of an electro-mechanical relay.
Tables may even overlay each other. For example, it is not uncommon to address a particular discrete input as a bit of a register address: bit 34 may be the 3rd bit of the 3rd input register. In this distribution, addressable tables are called I<zone...
To summarize, the Modbus data model breaks a I<unit> into I<zones> in which data is addressable.
Now, Modbus uses Protocol Data Units. The PDUs are the basic blocks defined by the protocol; they are the binary messages that flow between clients and servers. PDUs encapsulate a request from a client or a response from a server. They are independen...
view all matches for this distribution
view release on metacpan or search on metacpan
Optimized_64bit/SHA3api_ref.h view on Meta::CPAN
typedef struct
{
uint_t statebits; /* 256, 512, or 1024 */
union
{
Skein_Ctxt_Hdr_t h; /* common header "overlay" */
Skein_256_Ctxt_t ctx_256;
Skein_512_Ctxt_t ctx_512;
Skein1024_Ctxt_t ctx1024;
} u;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Directory/Transactional.pm view on Meta::CPAN
if ( -d $txn_backup ) {
my $files = $self->_get_file_list($txn_backup);
# move all the backups back into the root directory
$self->merge_overlay( from => $txn_backup, to => $self->_root, files => $files );
remove_tree($txn_backup);
}
}
lib/Directory/Transactional.pm view on Meta::CPAN
find( { no_chdir => 1, wanted => sub { $files->insert( File::Spec->abs2rel($_, $from) ) if -f $_ } }, $from );
return $files;
}
sub merge_overlay {
my ( $self, %args ) = @_;
my ( $from, $to, $backup, $files ) = @args{qw(from to backup files)};
my @rem;
lib/Directory/Transactional.pm view on Meta::CPAN
my $dirty_lock = $self->set_dirty;
$txn->create_backup_dir;
# move all the files from the txn dir into the root dir, using the backup dir
$self->merge_overlay( from => $txn->work, to => $self->_root, backup => $txn->backup, files => $changed );
# we're finished, remove backup dir denoting successful commit
CORE::rename $txn->backup, $txn->work . ".cleanup" or die $!;
}
lib/Directory/Transactional.pm view on Meta::CPAN
# it's a nested transaction, which means we don't need to be
# careful about comitting to the parent, just share all the locks,
# deletion metadata etc by merging it
$txn->propagate;
$self->merge_overlay( from => $txn->work, to => $txn->parent->work, files => $changed );
}
# clean up work dir and (renamed) backup dir
remove_tree( $txn->work );
remove_tree( $txn->work . ".cleanup" );
lib/Directory/Transactional.pm view on Meta::CPAN
# an error happenned during txn_commit trigerring a rollback
if ( -d ( my $txn_backup = $txn->backup ) ) {
my $files = $self->_get_file_list($txn_backup);
# move all the backups back into the root directory
$self->merge_overlay( from => $txn_backup, to => $self->_root, files => $files );
}
} else {
# any inherited locks that have been upgraded in this txn need to be
# downgraded back to shared locks
foreach my $lock ( @{ $txn->downgrade } ) {
lib/Directory/Transactional.pm view on Meta::CPAN
}
return;
}
sub _locate_dirs_in_overlays {
my ( $self, $path ) = @_;
my @dirs = ( (map { $_->work } $self->_txn_stack), $self->root );
if ( defined $path ) {
lib/Directory/Transactional.pm view on Meta::CPAN
} else {
return @dirs;
}
}
sub _locate_file_in_overlays {
my ( $self, $path ) = @_;
if ( my $txn = $self->_txn_for_path($path) ) {
File::Spec->catfile($txn->work, $path);
} else {
lib/Directory/Transactional.pm view on Meta::CPAN
sub old_stat {
my ( $self, $path ) = @_;
my $t = $self->_auto_txn;
CORE::stat($self->_locate_file_in_overlays($path));
}
sub stat {
my ( $self, $path ) = @_;
my $t = $self->_auto_txn;
require File::stat;
File::stat::stat($self->_locate_file_in_overlays($path));
}
sub is_deleted {
my ( $self, $path ) = @_;
lib/Directory/Transactional.pm view on Meta::CPAN
sub exists {
my ( $self, $path ) = @_;
my $t = $self->_auto_txn;
return -e $self->_locate_file_in_overlays($path);
}
sub is_dir {
my ( $self, $path ) = @_;
lib/Directory/Transactional.pm view on Meta::CPAN
sub is_file {
my ( $self, $path ) = @_;
my $t = $self->_auto_txn;
return -f $self->_locate_file_in_overlays($path);
}
sub unlink {
my ( $self, $path ) = @_;
lib/Directory/Transactional.pm view on Meta::CPAN
sub openr {
my ( $self, $file ) = @_;
my $t = $self->_resource_auto_txn;
my $src = $self->_locate_file_in_overlays($file);
open my $fh, "<", $src or die "openr($file): $!";
$t->register($fh) if $t;
lib/Directory/Transactional.pm view on Meta::CPAN
$t->register($fh) if $t;
return $fh;
}
sub _readdir_from_overlay {
my ( $self, $path ) = @_;
my $t = $self->_auto_txn;
my $ex_lock = $self->check_dirty;
my @dirs = $self->_locate_dirs_in_overlays($path);
my $files = Set::Object->new;
# compute union of all directories
foreach my $dir ( @dirs ) {
lib/Directory/Transactional.pm view on Meta::CPAN
undef $path if $path eq "/" or !length($path);
my $t = $self->_auto_txn;
my $files = $self->_readdir_from_overlay($path);
my @txns = $self->_txn_stack;
# remove deleted files
file: foreach my $file ( $files->members ) {
lib/Directory/Transactional.pm view on Meta::CPAN
undef $path if $path eq "/" or !length($path);
my $t = $self->_auto_txn;
my $files = $self->_readdir_from_overlay($path);
$files->remove('.', '..');
my @txns = $self->_txn_stack;
lib/Directory/Transactional.pm view on Meta::CPAN
my $txn_path = File::Spec->catfile( $txn->work, $path );
unless ( $txn->is_changed_in_head($path) ) {
$self->lock_path_write($path);
my $src = $self->_locate_file_in_overlays($path);
if ( my $stat = File::stat::stat($src) ) {
if ( $stat->nlink > 1 ) {
croak "the file $src has a link count of more than one.";
}
lib/Directory/Transactional.pm view on Meta::CPAN
At this point the exclusive lock is dropped, and a shared lock on the same file
is taken, which will be retained for the lifetime of the object.
Each transaction (root or nested) gets its own work directory, which is an
overlay of its parent.
All write operations are performed in the work directory, while read operations
walk up the tree.
Aborting a transaction consists of simply removing its work directory.
lib/Directory/Transactional.pm view on Meta::CPAN
Hard links will B<NOT> be retained.
=item readdir $path
Merges the overlays of all the transactions and returns unsorted basenames.
A path of C<""> can be used to list the root directory.
=item list $path
lib/Directory/Transactional.pm view on Meta::CPAN
These are documented so that they may provide insight into the inner workings
of the module, but should not be considered part of the API.
=over 4
=item merge_overlay
Merges one directory over another.
=item recover
view all matches for this distribution
view release on metacpan or search on metacpan
profiles/default/skel/.gitlab-ci.yml view on Meta::CPAN
services:
- docker:dind
variables:
CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH
DOCKER_DRIVER: overlay2
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
stages:
view all matches for this distribution
view release on metacpan or search on metacpan
profiles/default/skel/gitlab-ci.yml view on Meta::CPAN
services:
- docker:dind
variables:
CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH
DOCKER_DRIVER: overlay2
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
stages:
view all matches for this distribution