view release on metacpan or search on metacpan
RETVAL = SDL_CreateYUVOverlay ( width, height, format, display );
OUTPUT:
RETVAL
int
LockYUVOverlay ( overlay )
SDL_Overlay *overlay
CODE:
RETVAL = SDL_LockYUVOverlay(overlay);
OUTPUT:
RETVAL
void
UnlockYUVOverlay ( overlay )
SDL_Overlay *overlay
CODE:
SDL_UnlockYUVOverlay(overlay);
int
DisplayYUVOverlay ( overlay, dstrect )
SDL_Overlay *overlay
SDL_Rect *dstrect
CODE:
RETVAL = SDL_DisplayYUVOverlay ( overlay, dstrect );
OUTPUT:
RETVAL
void
FreeYUVOverlay ( overlay )
SDL_Overlay *overlay
CODE:
SDL_FreeYUVOverlay ( overlay );
Uint32
OverlayFormat ( overlay, ... )
SDL_Overlay *overlay
CODE:
if ( items > 1 )
overlay->format = SvIV(ST(1));
RETVAL = overlay->format;
OUTPUT:
RETVAL
int
OverlayW ( overlay, ... )
SDL_Overlay *overlay
CODE:
if ( items > 1 )
overlay->w = SvIV(ST(1));
RETVAL = overlay->w;
OUTPUT:
RETVAL
int
OverlayH ( overlay, ... )
SDL_Overlay *overlay
CODE:
if ( items > 1 )
overlay->h = SvIV(ST(1));
RETVAL = overlay->h;
OUTPUT:
RETVAL
int
OverlayPlanes ( overlay, ... )
SDL_Overlay *overlay
CODE:
if ( items > 1 )
overlay->planes = SvIV(ST(1));
RETVAL = overlay->planes;
OUTPUT:
RETVAL
Uint32
OverlayHW ( overlay )
SDL_Overlay *overlay
CODE:
RETVAL = overlay->hw_overlay;
OUTPUT:
RETVAL
Uint16*
OverlayPitches ( overlay )
SDL_Overlay *overlay
CODE:
RETVAL = overlay->pitches;
OUTPUT:
RETVAL
Uint8**
OverlayPixels ( overlay )
SDL_Overlay *overlay
CODE:
RETVAL = overlay->pixels;
OUTPUT:
RETVAL
int
WMToggleFullScreen ( surface )
view all matches for this distribution
view release on metacpan or search on metacpan
NPAdmin/MIBs/Printer-MIB.txt view on Meta::CPAN
-- registered in certain jurisdictions
langIPDS(7), -- Intelligent Printer Data Stream
-- Bi-directional print data stream for
-- documents consisting of data objects
-- (text, image, graphics, bar codes),
-- resources (fonts, overlays) and page,
-- form and finishing instructions.
-- Facilitates system level device
-- control, document tracking and error
-- recovery throughout the print
-- process.
NPAdmin/MIBs/Printer-MIB.txt view on Meta::CPAN
-- Definitions that allow the
-- composition, interchange, and
-- presentation of final form
-- documents as a collection of data
-- objects (text, image, graphics, bar
-- codes), resources (fonts, overlays)
-- and page, form and finishing
-- instructions.
-- Pennant Systems, IBM
langREGIS(16), -- Remote Graphics Instruction Set,
-- Digital Equipment Corp., Maynard MA
view all matches for this distribution
view release on metacpan or search on metacpan
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
}
return $ph->{features}->access($key, @_);
}
# No args - get the auto_features & overlay the regular features
my %features;
my %auto_features = $ph->{auto_features}->access();
while (my ($name, $info) = each %auto_features) {
my $failures = $self->prereq_failures($info);
my $disabled = grep( /^(?:\w+_)?(?:requires|conflicts)$/,
view all matches for this distribution
view release on metacpan or search on metacpan
.tmp/libpng/pngread.c view on Meta::CPAN
#endif /* SEQUENTIAL_READ */
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the entire image. If the image has an alpha channel or a tRNS
* chunk, and you have called png_handle_alpha()[*], you will need to
* initialize the image to the current image that PNG will be overlaying.
* We set the num_rows again here, in case it was incorrectly set in
* png_read_start_row() by a call to png_read_update_info() or
* png_start_read_image() if png_set_interlace_handling() wasn't called
* prior to either of these functions like it should have been. You can
* only call this function once. If you desire to have an image for
view all matches for this distribution
view release on metacpan or search on metacpan
lib/SPVM/Resource/SQLite.native/src/sqlite3.c view on Meta::CPAN
** Each name/number pair is encoded by subsequent groups of 3 or more
** integers.
**
** Each name/number pair starts with two integers which are the numeric
** value for the pair and the size of the name/number pair, respectively.
** The text name overlays one or more following integers. The text name
** is always zero-terminated.
**
** Conceptually:
**
** struct VList {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/SPVM/Resource/Zlib/V1_2_11.native/src/ChangeLog view on Meta::CPAN
- mention in README that the zlib format is now RFC1950
- updated Makefile.dj2
- added algorithm.doc
Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion]
- fix array overlay in deflate.c which sometimes caused bad compressed data
- fix inflate bug with empty stored block
- fix MSDOS medium model which was broken in 0.99
- fix deflateParams() which could generate bad compressed data.
- Bytef is define'd instead of typedef'ed (work around Borland bug)
- added an INDEX file
view all matches for this distribution
view release on metacpan or search on metacpan
lib/SPVM/Resource/Zlib.native/src/ChangeLog view on Meta::CPAN
- mention in README that the zlib format is now RFC1950
- updated Makefile.dj2
- added algorithm.doc
Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion]
- fix array overlay in deflate.c which sometimes caused bad compressed data
- fix inflate bug with empty stored block
- fix MSDOS medium model which was broken in 0.99
- fix deflateParams() which could generate bad compressed data
- Bytef is define'd instead of typedef'ed (work around Borland bug)
- added an INDEX file
view all matches for this distribution
view release on metacpan or search on metacpan
lib/SQL/Admin/Driver/Pg/Keywords.pm view on Meta::CPAN
qw( minvalue mode month move names ),
qw( national nchar next no nocreatedb ),
qw( nocreaterole nocreateuser noinherit nologin none ),
qw( nosuperuser nothing notify nowait nullif ),
qw( numeric object of oids operator ),
qw( option out overlay owner partial ),
qw( password position precision prepare prepared ),
qw( preserve prior privileges procedural procedure ),
qw( quote read real recheck reindex ),
qw( relative release rename repeatable replace ),
qw( reset restart restrict returns revoke ),
view all matches for this distribution
view release on metacpan or search on metacpan
lib/SQL/Translator/Parser/OpenAPI.pm view on Meta::CPAN
$translator->translate($file);
# or...
$ sqlt -f OpenAPI -t MySQL <my-openapi.json >my-mysqlschema.sql
# or, applying an overlay:
$ perl -MHash::Merge=merge -Mojo \
-e 'print j merge map j(f($_)->slurp), @ARGV' \
t/06-corpus.json t/06-corpus.json.overlay |
sqlt -f OpenAPI -t MySQL >my-mysqlschema.sql
=head1 DESCRIPTION
This module implements a L<SQL::Translator::Parser> to convert
view all matches for this distribution
view release on metacpan or search on metacpan
lib/SVG/Sparkline/Cookbook.pod view on Meta::CPAN
The L<SVG::Sparkline> does not currently support grids. I am concerned that
adding a grid might also violate Tufte's intent for the sparkline.
At present, the best solution would be to generate a grid of the appropriate
dimensions and overlay it with the sparkline. This only works if the sparkline
has no background color, which leaves the background transparent.
=head1 AUTHOR
G. Wade Johnson C<< <gwadej@cpan.org> >>
view all matches for this distribution
view release on metacpan or search on metacpan
samples/sample4.html view on Meta::CPAN
}
async function showBraveModal() {
const isBrave = await isBraveBrowser();
if (isBrave) {
// Blur the background
const overlay = document.createElement("div");
overlay.id = "brave-overlay";
overlay.style.position = "fixed";
overlay.style.top = "0";
overlay.style.left = "0";
overlay.style.width = "100%";
overlay.style.height = "100%";
overlay.style.background = "rgba(0,0,0,0.5)";
overlay.style.backdropFilter = "blur(5px)";
overlay.style.display = "flex";
overlay.style.justifyContent = "center";
overlay.style.alignItems = "center";
const modal = document.createElement("div");
modal.style.background = "white";
modal.style.padding = "20px";
modal.style.borderRadius = "8px";
modal.style.textAlign = "center";
modal.innerHTML = `<p>This site is supported by advertising.<br>Use a different browser.</p><!--
<button onclick="document.getElementById('brave-overlay').remove();">Close</button>
-->
`;
overlay.appendChild(modal);
document.body.appendChild(overlay);
}
}
document.addEventListener("DOMContentLoaded", showBraveModal);</script> <a href="/index.htm"><img border="0" src="/images/brass.gif" alt="The Brass Band Portal" width="204" height="30"></a> <h1>Grange Moor Brass Band</h1>
<h2> West Yorkshire, United Kingdom</h2>
<p>A woldwide list of brass bands.</p><p>This directory of brass bands in WEST YORKSHIRE, United Kingdom is actively maintained,
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/book23 view on Meta::CPAN
great-hearted Odysseus within his house, and anointed him
with olive-oil, and cast about him a goodly mantle and a
doublet. Moreover Athene shed great beauty from his head
downwards, and made him greater and more mighty to behold,
and from his head caused deep curling locks to flow, like
the hyacinth flower. And as when some skilful man overlays
gold upon silver, one that Hephaestus and Pallas Athene
have taught all manner of craft, and full of grace is his
handiwork, even so did Athene shed grace about his head and
shoulders, and forth from the bath he came, in form like to
the immortals. Then he sat down again on the high seat,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Search/InvertedIndex.pm view on Meta::CPAN
# ################################################################
#
# DATABASE STRUCTURES
#
# The inverted database uses a complex overlay built on a generic
# key/value accessible database (it really is fairly 'database agnostic').
#
# It is organized into sub-sets of information by database key name space:
#
# ; Stringifier. The serializer used for packing information for storage
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Selenium/Screenshot.pm view on Meta::CPAN
);
# Do the actual pixel by pixel comparison. This can take a while.
my $diff = $self->_cmp->compare;
# Post processing to overlay the difference onto the
# opponent. First, subtract a white box from our difference image;
# to make everything white transparent instead.
my $work = Imager->new(
xsize => $diff->getwidth,
ysize => $diff->getheight,
view all matches for this distribution
view release on metacpan or search on metacpan
sepia-cpan.el view on Meta::CPAN
(switch-to-buffer "*sepia-cpan*")
(sepia-cpan-mode)
(setq buffer-read-only nil)
(let ((inhibit-read-only t))
(erase-buffer))
(remove-overlays)
(insert title "
[r]eadme, [d]ocumentation, [i]nstall, [q]uit,
[s]earch-by-name, [/][S]earch-by-description, [l]ist-for-author
")
view all matches for this distribution
view release on metacpan or search on metacpan
zstd/common/xxhash.h view on Meta::CPAN
* [ a & 0xFFFFFFFF | b & 0xFFFFFFFF ],[ a >> 32 | b >> 32 ]
*
* Due to significant changes in aarch64, the fastest method for aarch64 is
* completely different than the fastest method for ARMv7-A.
*
* ARMv7-A treats D registers as unions overlaying Q registers, so modifying
* D11 will modify the high half of Q5. This is similar to how modifying AH
* will only affect bits 8-15 of AX on x86.
*
* VZIP takes two registers, and puts even lanes in one register and odd lanes
* in the other.
view all matches for this distribution
view release on metacpan or search on metacpan
zstd/common/xxhash.h view on Meta::CPAN
* [ a & 0xFFFFFFFF | b & 0xFFFFFFFF ],[ a >> 32 | b >> 32 ]
*
* Due to significant changes in aarch64, the fastest method for aarch64 is
* completely different than the fastest method for ARMv7-A.
*
* ARMv7-A treats D registers as unions overlaying Q registers, so modifying
* D11 will modify the high half of Q5. This is similar to how modifying AH
* will only affect bits 8-15 of AX on x86.
*
* VZIP takes two registers, and puts even lanes in one register and odd lanes
* in the other.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Serge/Engine/Plugin/feature_branch.pm view on Meta::CPAN
}
# otherwise, we're in a slave job
# if we're generating localized files, $lang will be set
return 1 if defined $lang; # extract everything to translate all the strings, not just overlay ones
# otherwise (when $lang is not set) we're parsing the source file
return $self->string_exists($stringref, $context, ) ? 0 : 1; # extract only strings which are missing from the master job
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/js-source/Widget/Lightbox2.js view on Meta::CPAN
return this;
};
Widget.Lightbox2.prototype._initialize = function (params) {
var overlay = document.createElement("div");
var opacity_val = params.opacity;
if ( typeof opacity_val == "undefined" ) {
opacity_val = 0.7;
}
share/js-source/Widget/Lightbox2.js view on Meta::CPAN
var content = params.sourceElement;
if ( ! content ) {
throw "Must provide a sourceElement parameter when making a Widget.Lightbox2 object";
}
DOM.Element.hide(overlay);
var body = document.getElementsByTagName("body")[0];
body.appendChild(overlay);
with ( overlay.style ) {
position = "fixed";
width = "100%";
height = "100%";
top = 0;
left = 0;
share/js-source/Widget/Lightbox2.js view on Meta::CPAN
}
);
}
}
this.overlay = overlay;
this.content = content;
};
Widget.Lightbox2.prototype.show = function () {
if ( this.iframe ) {
DOM.Element.show( this.iframe );
}
DOM.Element.show( this.overlay );
DOM.Element.show( this.content );
var left = ( document.body.clientWidth - this.content.offsetWidth ) / 2;
this.content.style.left = left + "px";
window.scroll( 0, 0 );
};
Widget.Lightbox2.prototype.hide = function () {
DOM.Element.hide( this.content );
DOM.Element.hide( this.overlay );
if ( this.iframe ) {
DOM.Element.hide( this.iframe );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Slovo/resources/public/css/slovo-min.css view on Meta::CPAN
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospac...
.mui--color-red-50{color:#FFEBEE!important}.mui--bg-color-red-50{background-color:#FFEBEE!important}.mui--color-red-100{color:#FFCDD2!important}.mui--bg-color-red-100{background-color:#FFCDD2!important}.mui--color-red-200{color:#EF9A9A!important}.mui...
view all matches for this distribution
view release on metacpan or search on metacpan
htdocs/images/arrow-desc.gif
htdocs/images/boxed-bg-bottom.png
htdocs/images/boxed-bg-right.png
htdocs/images/calendar.gif
htdocs/images/down.gif
htdocs/images/error_overlay.png
htdocs/images/favicon.ico
htdocs/images/grid.png
htdocs/images/h2_bg.gif
htdocs/images/h3_bg.gif
htdocs/images/header2_bg.gif
view all matches for this distribution
view release on metacpan or search on metacpan
Backup/Snapback.pm view on Meta::CPAN
}
=item config
Gets or sets configuration parameters. The base is set in hardcoded
program defaults; it then is overlayed with the configuration file results.
If a configuration block is entered, those settings override the parent
configuration block. Finally, internal setting can be done, temporarily
overriding configuration file settings (because of option dependencies).
my $compress = $snap->config(-Compress);
view all matches for this distribution
view release on metacpan or search on metacpan
inet_ntop.c view on Meta::CPAN
/*
* Note that int32_t and int16_t need only be "at least" large enough
* to contain a value of the specified size. On some systems, like
* Crays, there is no such thing as an integer variable with 16 bits.
* Keep this in mind if you think this function should have been coded
* to use pointer overlays. All the world's not a VAX.
*/
char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
struct { int base, len; } best, cur;
unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ];
int i;
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/devtree view on Meta::CPAN
my $libdevinfo_tree = Solaris::DeviceTree::Libdevinfo->new;
require Solaris::DeviceTree::Filesystem;
my $filesystem_tree = Solaris::DeviceTree::Filesystem->new;
require Solaris::DeviceTree::PathToInst;
my $path_to_inst_tree = Solaris::DeviceTree::PathToInst->new;
print_businfo( indent => 1, node => make_overlay_tree() );
} else {
pod2usage( 1 );
}
sub make_overlay_tree {
require Solaris::DeviceTree::Libdevinfo;
my $libdevinfo_tree = Solaris::DeviceTree::Libdevinfo->new;
require Solaris::DeviceTree::Filesystem;
my $filesystem_tree = Solaris::DeviceTree::Filesystem->new;
require Solaris::DeviceTree::PathToInst;
my $path_to_inst_tree = Solaris::DeviceTree::PathToInst->new;
my $overlay_tree = Solaris::DeviceTree::Overlay->new(
sources => {
libdevinfo => $libdevinfo_tree,
filesystem => $filesystem_tree,
path_to_inst => $path_to_inst_tree,
},
);
return $overlay_tree;
}
# -- Utility functions --
scripts/devtree view on Meta::CPAN
# require Solaris::DeviceTree::Filesystem;
# my $tree = new Solaris::DeviceTree::Libdevinfo;
# my $tree = new Solaris::DeviceTree::PathToInst;
# my $tree = new Solaris::DeviceTree::Filesystem;
# TODO: -> Implement has_data_source
my $tree = make_overlay_tree;
if( defined $options{attr} && $options{attr} ne '' ) {
$options{attr} = [ split( /,/, $options{attr} ) ];
}
scripts/devtree view on Meta::CPAN
# -- disk --
sub print_disk {
require Solaris::DeviceTree::Overlay;
my $tree = make_overlay_tree;
# -> TODO: Select wheter all or only accessible disks should be printed
# Criteria:
# o has instance in the kernel
# o has ctds
scripts/devtree view on Meta::CPAN
}
# -- tape --
sub print_tape {
my $tree = make_overlay_tree;
# -> TODO: Select wheter all or only accessible tapes should be printed
# Criteria:
# o has instance in the kernel
# o has /dev/rmt
scripts/devtree view on Meta::CPAN
}
# -- Network --
sub print_network {
my $tree = make_overlay_tree;
# -> TODO: Historical network nodes only in /etc/path_to_inst should be honored
print "The following network devices have been found:\n";
foreach my $node (sort { $a->driver_name . $a->instance cmp $b->driver_name . $b->instance }
view all matches for this distribution
view release on metacpan or search on metacpan
javascript/yui/build/assets/skins/sam/container.css view on Meta::CPAN
Copyright (c) 2007, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.3.0
*/
.yui-overlay,.yui-panel-container{visibility:hidden;position:absolute;z-index:1;}yui-panel-container form{margin:0;}.masked .yui-panel-container{z-index:2;}.mask{z-index:1;display:none;position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;}.m...
view all matches for this distribution
view release on metacpan or search on metacpan
share/enable1.txt view on Meta::CPAN
overlaps
overlarge
overlate
overlavish
overlax
overlay
overlaying
overlays
overleaf
overleap
overleaped
overleaping
overleaps
view all matches for this distribution
view release on metacpan or search on metacpan
ast/src/axis.c view on Meta::CPAN
want to obtain a string that we cannot interpret here (where we are
restricted to C format specifiers capable of formatting double values).
Classes that extend the syntax should provide their own astAxisFormat method
and may need to store the string in a separate location. The original
location should not be re-used as the string it contains may be needed by
the Axis astOverlay method when overlaying attributes on to another Axis
object. */
} else {
fmt0 = GetAxisFormat( this, status );
/* Parse the Format string. This returns a collection of flags indicating
ast/src/axis.c view on Meta::CPAN
* Class Membership:
* Axis method.
* Description:
* This function overlays attributes of one Axis (the "template") on to
* another Axis, so as to over-ride selected attributes of that second
* Axis. Normally only those attributes which have been specifically set
* in the template will be transferred. This implements a form of
* defaulting, in which an Axis acquires attributes from the template, but
* retains its original attributes (as the default) if new values have not
ast/src/axis.c view on Meta::CPAN
*/
/* Check the global error status. */
if ( !astOK ) return;
/* Define a macro to overlay a single attribute. This tests if the attribute
is set in the template Axis. If it is, its value is obtained and set in the
result Axis also. */
#define OVERLAY(par) \
if ( astTestAxis##par( template ) ) { \
astSetAxis##par( result, astGetAxis##par( template ) ); \
view all matches for this distribution
view release on metacpan or search on metacpan
data/localhost.rawcmd view on Meta::CPAN
' "vfs-options": "rw,nosuid,nodev,relatime"',
' },{',
' "avail": 1472344064,',
' "freq": null,',
' "fsroot": "/",',
' "fstype": "overlay",',
' "fs-options": "rw,lowerdir=/var/lib/docker/overlay2/l/46RKIH5STJW3WCL6II7ORRCIME:/var/lib/docker/overlay2/l/SUJPO47ETK2JZRKSP6WI3EVN7O:/var/lib/docker/overlay2/l/NEGHRAZIWWVC3N3MBPAJ4BYHMN:/var/lib/docker/ove...
' "id": 1386,',
' "label": null,',
' "maj:min": "0:58",',
' "options": "rw,relatime,lowerdir=/var/lib/docker/overlay2/l/46RKIH5STJW3WCL6II7ORRCIME:/var/lib/docker/overlay2/l/SUJPO47ETK2JZRKSP6WI3EVN7O:/var/lib/docker/overlay2/l/NEGHRAZIWWVC3N3MBPAJ4BYHMN:/var/lib/dock...
' "opt-fields": "shared:710",',
' "parent": 27,',
' "partlabel": null,',
' "partuuid": null,',
' "passno": null,',
' "propagation": "shared",',
' "size": 73659600896,',
' "source": "overlay",',
' "sources": [',
' "overlay"',
' ],',
' "target": "/var/lib/docker/overlay2/e02df2e121eb163289f9285aa3f2833cb6190bf73c0040096dd4a0492501d5fa/merged",',
' "tid": 614135,',
' "used": 68666753024,',
' "use%": "93%",',
' "uuid": null,',
' "vfs-options": "rw,relatime"',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Strehler/public/strehler/js/jquery-ui-1.10.3.custom.min.js view on Meta::CPAN
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.a...
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(e,t){function i(t,i){var s,n,r,o=t.nodeName.toLowerCase();return"area"===o?(s=t.parentNode,n=s.name,t.href&&n&&"map"===s.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&a(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.d...
return isNaN(t)?c:t},m=p(d[0]),f=Math.max(m,p(d[1]||"")),m=a?Math.max(m,a.getFullYear()):m,f=s?Math.min(f,s.getFullYear()):f,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f>=m;m++)e.yearshtml+="<opti...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/String/Expand.pm view on Meta::CPAN
sub expand_strings_inner($$$$);
sub expand_strings_one_var($$$$)
{
my ( $var, $strs, $overlay, $done ) = @_;
# Chop off delimiting {braces} if present
$var =~ s/^\{(.*)\}$/$1/;
if( exists $strs->{$var} ) {
lib/String/Expand.pm view on Meta::CPAN
# Detect loops
if( exists $done->{$var} ) {
croak "Variable loop trying to expand '$var'";
}
$done->{$var} = 0;
expand_strings_inner( $strs, $overlay, $var, $done );
return $strs->{$var};
}
return $overlay->{$var} if( exists $overlay->{$var} );
croak "Unknown variable '$var'";
}
sub expand_strings_inner($$$$)
{
my ( $strs, $overlay, $v, $done ) = @_;
if( $strs->{$v} =~ m/[\\\$]/ ) {
$strs->{$v} =~ s{\\([\\\$])|$VARNAME_MATCH}
{ $1 or expand_strings_one_var( $2, $strs, $overlay, $done )}eg;
}
$done->{$v} = 1;
}
=head2 expand_strings( \%strs, \%overlay )
This function takes a hash of strings, and expands variable names embedded in
any of them, in the same form as the string passed to C<expand_string()>.
Expansions may refer to other strings, or to values in the C<I<%overlay>>
hash. Values in the main variables hash take precidence over values in the
overlay.
Where values refer to other values, care must be taken to avoid cycles. If a
cycle is detected while attempting to expand the values, then an exception is
thrown.
lib/String/Expand.pm view on Meta::CPAN
=item \%strs
Reference to a hash containing variables to expand
=item \%overlay
Reference to a hash containing other variable values
=item Returns
lib/String/Expand.pm view on Meta::CPAN
=cut
sub expand_strings($$)
{
my ( $strs, $overlay ) = @_;
# 0: a variable expansion is in progress
# 1: value has been correctly expanded
my %done;
foreach my $v ( keys %$strs ) {
expand_strings_inner( $strs, $overlay, $v, \%done );
}
}
# Keep perl happy; keep Britain tidy
1;
view all matches for this distribution