view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
xs/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/Raw/JSON.pm view on Meta::CPAN
Decode: accept top-level scalars (C<42>, C<"hi">, C<true>). Default
true.
=item C<allow_nan_inf>
Round-trip C<NaN>, C<Infinity>, C<-Infinity>. Non-standard JSON;
default false.
=item C<ordered>
Decode JSON objects as L<Tie::OrderedHash>-tied hashes so insertion
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/Raw/XML/XPath.pm view on Meta::CPAN
C<< /descendant-or-self::node()/ >>, so the predicate belongs to the
C<child::a> step and selects the first C<a> child of each element that
has one. C<(//a)[1]> is the first in the document.
Numbers are IEEE doubles with the specification's semantics: C<1 div 0>
is C<Infinity>, C<0 div 0> is C<NaN>, and C<string()> of a number never
uses exponent notation and never shows a trailing zero.
C<id()> answers over whatever index the document has: the attribute names
given in C<id_attrs>, or the ID attributes its document type declaration
named when it was parsed with C<< validate => 1 >>, or C<xml:id> under
view all matches for this distribution
view release on metacpan or search on metacpan
include/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
script/rsybak view on Meta::CPAN
# $res->{expr_match} = join(
# " && ",
# "($dt instanceof Date)",
# );
#
# $res->{expr_coerce} = "isNaN($dt) ? ['Invalid date'] : [null, $dt]";
#
# $res;
#}
#
#1;
script/rsybak view on Meta::CPAN
# $res->{expr_match} = join(
# " && ",
# "typeof($dt)=='string'",
# );
#
# $res->{expr_coerce} = "(function (_m) { _m = new Date($dt); if (isNaN(_m)) { return ['Invalid date'] } else { return [null, _m] } })()";
#
# $res;
#}
#
#1;
script/rsybak view on Meta::CPAN
#
# $res->{expr_match} = join(
# " && ",
# "(typeof($dt)=='number' || typeof($dt)=='string' && $dt.match(/^[0-9]+(?:\\.[0-9]+)?\$/))",
# "parseFloat($dt) >= 0",
# "!isNaN(parseFloat($dt))",
# "isFinite(parseFloat($dt))",
# );
#
# $res->{expr_coerce} = "parseFloat($dt)";
#
script/rsybak view on Meta::CPAN
# if ($cd->{cl_is_expr}) {
# $c->add_ccl($cd, {});
# } else {
# $c->add_ccl($cd, {
# fmt => $cv ?
# q[%(modal_verb)s be a NaN] :
# q[%(modal_verb_neg)s be a NaN],
# });
# }
#}
#
#sub clause_is_inf {
script/rsybak view on Meta::CPAN
# q[bilangan desimal],
#
# q[decimal numbers],
# q[bilangan desimal],
#
# q[%(modal_verb)s be a NaN],
# q[%(modal_verb)s NaN],
#
# q[%(modal_verb_neg)s be a NaN],
# q[%(modal_verb_neg)s NaN],
#
# q[%(modal_verb)s be an infinity],
# q[%(modal_verb)s tak hingga],
#
# q[%(modal_verb_neg)s be an infinity],
script/rsybak view on Meta::CPAN
#
#Note that numerical precision has the same meaning as under Perl (so
#binary to decimal conversion follows the same rules as in Perl, which
#can differ to other languages). Also, your perl interpreter might expose
#extensions to the floating point numbers of your platform, such as
#infinities or NaN's - these cannot be represented in JSON, and it is an
#error to pass those in.
#
#=back
#
#=head2 OBJECT SERIALISATION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/SOPS.pm view on Meta::CPAN
L<docs/adr/0040|https://github.com/Getty/p5-file-sops/blob/main/docs/adr/0040-an-encrypted-slot-carries-a-non-finite-float-because-sops-writes-one.md>.
B<In YAML that literal is not refused any more, because it is not a number
there.> Since 0.003 L<File::SOPS::Format::YAML/parse> hands back the string
go-yaml reads -- C<1e400>, a 401-digit integer and the bare spellings C<Inf>,
C<NaN> and their relatives -- so the guard never sees a float, and the leaf is
written as C<type:str>, which is what C<sops -e> writes for the identical
plaintext (exit 0, measured against sops 3.13.3, encrypted and unencrypted slot
alike). Until 0.003 the same document could be neither written here -- all 20
measured hit the guard -- nor read, 17 of those 20 failing with C<MAC
verification failed>.
lib/File/SOPS.pm view on Meta::CPAN
=head3 A plain YAML infinity is the float go-yaml reads
B<New in 0.003, and a change for existing callers of every method that reads a
YAML file.> A leaf a YAML document wrote as a B<plain> scalar whose token
go-yaml resolves to a non-finite float -- C<.inf>, C<.Inf>, C<.INF>, the same
three with a leading C<+> or C<->, C<.nan>, C<.NaN>, C<.NAN> -- is that float
here too, carrying the document's own token as its text. A B<quoted> C<".inf">
is the string it has always been; the difference is decided by asking
L<YAML::PP> how the document wrote the scalar, never by matching the leaf's
text. See L<File::SOPS::Format::YAML/A plain infinity comes back as the float
go-yaml reads>.
lib/File/SOPS.pm view on Meta::CPAN
What it means per slot, measured against sops 3.13.3 for all twelve spellings:
=over 4
=item * In an B<unencrypted> slot the leaf is written as the token the document
had, and the MAC digest covers C<+Inf> / C<-Inf> / C<NaN>. C<sops -d> reads it,
and for the three spellings C<sops -e> itself writes the wire bytes are
identical to sops's.
=item * In an B<encrypted> slot the leaf is B<refused>, naming the key path:
the wire form there is C<type:float> with the plaintext C<+Inf>, and
lib/File/SOPS.pm view on Meta::CPAN
=head3 A YAML literal that overflows a double comes back as a string
B<New in 0.003, and a change for existing callers.> From an B<unencrypted>
YAML slot, a literal libyaml resolves to a non-finite double -- C<1e400>, a
401-digit integer, and the bare spellings C<Inf>, C<inf>, C<INF>, C<Infinity>,
C<NaN>, C<nan>, C<NAN>, C<-Inf> and C<+Inf> -- comes back as a plain B<string>
holding the literal's own text. It used to carry C<Inf> or C<NaN> as its
numeric half as well, because L<YAML::XS> returns those literals with both
halves set.
B<This is a correction, and it does not extend to the encrypted slot.>
go-yaml -- the parser sops reads a document with -- resolves none of those
spellings to a number either: C<strconv.ParseFloat> answers C<ErrRange>, so
sops keeps a string, writes C<type:str> and digests the literal's own text. The
old return value also belonged to a document this library mostly could not read
at all: of 20 such documents C<sops -e> wrote and C<sops -d> read, 17 failed
here with C<MAC verification failed> and 3 verified by coincidence. An
B<encrypted> C<type:float> whose plaintext is C<+Inf>, C<-Inf> or C<NaN> is
B<unchanged> and still decrypts to a real Perl non-finite float, bit for bit --
measured on a document sops wrote, C<000000000000f07f>, C<000000000000f0ff> and
C<000000000000f8ff> -- because such a leaf is still an C<ENC[...]> string when
the document is parsed and cannot reach the retyping walk at all.
lib/File/SOPS.pm view on Meta::CPAN
positional digits rather than C<1e+300> -- and an encrypted slot is unaffected
either way.
B<Since 0.003 a non-finite YAML literal comes back from an unencrypted slot as
a string, and is not wrapped either.> C<1e400>, a 401-digit integer and the
bare spellings C<Inf>, C<inf>, C<INF>, C<Infinity>, C<NaN>, C<nan>, C<NAN>,
C<-Inf> and C<+Inf> are the string go-yaml reads there, and a string is not a
float. This is a B<correction> -- such a leaf used to carry C<Inf> or C<NaN> as
its numeric half, on the few of those documents that could be read here at all
-- and it stops at the unencrypted slot: an B<encrypted> C<type:float> whose
plaintext is C<+Inf>, C<-Inf> or C<NaN> still comes back as the real Perl
non-finite float it always did. That one is the single float this method does
B<not> wrap, because C<+Inf> and C<NaN> are wire spellings rather than a
number's decimal, so C<"$value"> is Perl's own C<Inf> / C<NaN> and not a
canonical form. See L</A YAML literal that overflows a double comes back as a
string> under L</decrypt> and
L<File::SOPS::Encrypted/canonical_float_dualvar>.
B<Dies if the path does not exist>, at any depth, naming the component that was
lib/File/SOPS.pm view on Meta::CPAN
already gone by then. See L</A plain YAML infinity is the float go-yaml reads>
and k123.
It is B<not> enough for a non-finite float in an B<encrypted> slot, and that
one is still wrong: such a leaf decrypts to a real Perl infinity, whose only
plaintext spelling from this emitter is a bare C<Inf> / C<-Inf> / C<NaN> --
tokens go-yaml reads as B<strings>. The editor is shown C<Inf>, the string
C<Inf> comes back, and the leaf is re-encrypted as a C<type:str>. C<sops edit>
keeps it a C<type:float>, measured. The file is written and nothing is said, so
this is the one place C<edit> can still lose a value quietly. Open as k134.
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Filesys/DiskUsage/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
easyxs/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
Call/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
t/fixtures/google.html view on Meta::CPAN
try{google.pt=window.chrome&&window.chrome.csi&&Math.floor(window.chrome.csi().pageT);}catch(e){}})();
(function(){'use strict';var b=null,g=this;var n=function(c,k){return function(e){e||(e=window.event);return k.call(c,e)}},s="undefined"!=typeof navigator&&/Macintosh/.test(navigator.userAgent),u="undefined"!=typeof navigator&&!/Opera/.test(navigator...
f!=this;f=f.parentNode){var p=f,m;var h=p;m=d;var q=h.__jsaction;if(!q){q={};e&&(h.__jsaction=q);var t=b;"getAttribute"in h&&(t=h.getAttribute("jsaction"));if(h=t)for(var h=h.split(A),t=0,Q=h?h.length:0;t<Q;t++){var r=h[t];if(r){var y=r.indexOf(":"),...
{eventType:m.i,event:a,targetElement:l,action:m.action,actionElement:p};break a}}d=b}if(d)if(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,"A"==d.actionElement.tagName&&"click"==k&&(a.preventDefault?a.preventDefault():a.returnValue=!1),c.d)...
window.rwt=function(a,g,h,m,n,i,c,o,j,d){return true};
(function(){try{var e=!0,h=null,k=!1;var ba=function(a,b,c,d){d=d||{};d._sn=["cfg",b,c].join(".");window.gbar.logger.ml(a,d)};var n=window.gbar=window.gbar||{},q=window.gbar.i=window.gbar.i||{},ca;function _tvn(a,b){var c=parseInt(a,10);return isNaN(...
function da(a,b,c){var d="on"+b;if(a.addEventListener)a.addEventListener(b,c,k);else if(a.attachEvent)a.attachEvent(d,c);else{var g=a[d];a[d]=function(){var a=g.apply(this,arguments),b=c.apply(this,arguments);return void 0==a?b:void 0==b?a:b&&a}}}var...
G=function(a){for(var b=0,c;(c=z[b])&&c[0]!=a;++b);c&&(!c[1].l&&!c[1].s)&&(c[1].s=e,E(2,a),c[1].url&&pa(c[1].url,a),c[1].libs&&F&&F(c[1].libs))},qa=function(a){C("gc",a)},H=h,ra=function(a){H=a},E=function(a,b,c){if(H){a={t:a,b:b};if(c)for(var d in c...
J.m="";J.l=[];I||z.push(["gl",{url:"//ssl.gstatic.com/gb/js/abc/glm_e7bb39a7e1a24581ff4f8d199678b1b9.js"}]);var ya={pu:sa,sh:"",si:ta};y.gl=ya;r("load",va,ua);r("dgl",va);r("agl",xa);q.o=I};var za=q.b("0.1",0.001),Aa=0;
function _mlToken(a,b){try{if(1>Aa){Aa++;var c,d=a,g=b||{},f=encodeURIComponent,m="es_plusone_gc_20130327.2_p0",l=["//www.google.com/gen_204?atyp=i&zx=",(new Date).getTime(),"&jexpid=",f("37102"),"&srcpg=",f("prop=1"),"&jsr=",Math.round(1/za),"&ogev=...
l.push(f(p)),l.push("="),l.push(f(g[p]));l.push("&emsg=");l.push(f(d.name+":"+d.message));var s=l.join("");Ba(s)&&(s=s.substr(0,2E3));c=s;var A=window.gbar.logger._aem(a,c);w(A)}}catch(Y){}}var Ba=function(a){return 2E3<=a.length},Da=function(a,b){re...
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/page-2022-02-26.html view on Meta::CPAN
data = parseFloat(fromvalue.replace(/\./g, ''));
} else {
data = parseFloat(fromvalue.replace(/\,/g, ''));
}
if (isNaN(data)) {
data = "";
}
}
$('#_Exchange_Rate_Portlet_INSTANCE_9070nSEKk62r_fromValue').val(data);
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
xs/include/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
public/assets/js/jquery.js view on Meta::CPAN
}if(!jQuery.support.style&¬xml&&name=="style"){return jQuery.attr(elem.style,"cssText",value)
}if(set){elem.setAttribute(name,""+value)
}var attr=!jQuery.support.hrefNormalized&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);
return attr===null?undefined:attr
}if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;
elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")")
}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":""
}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()
});
if(set){elem[name]=value
}return elem[name]
view all matches for this distribution
view release on metacpan or search on metacpan
docs/Tutorial4.html view on Meta::CPAN
d.setSeconds(Number(s.substr(f.indexOf('ss'), 2)));
var timezoneOffset = -(new Date().getTimezoneOffset());
d.setMinutes(d.getMinutes() + timezoneOffset);
if (! isNaN(d.getFullYear()) && d.getFullYear() > 1997) {
var t = f
.split('yyyy').join(d.getFullYear())
.split('mm').join(_zeroPad(d.getMonth()+1))
.split('dd').join(_zeroPad(d.getDate()))
.split('hh').join(_zeroPad(d.getHours()))
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ForgeOps/Tracker/MetricBuffer.pm view on Meta::CPAN
# - The buffer is capped at MAX_ENTRIES, and once full further entries are dropped until a flush
# lets go of them: an unreachable server fails every flush, and an uncapped buffer would keep
# growing until the batch is given up on (see DeliveryStatus::settle). Dropping the newest rather than the oldest keeps the
# entries a flush is delivering at the front of the list, which is what makes removing exactly those
# afterward exact.
# - A NaN or infinite value is dropped at record time: JSON::PP would encode it as the invalid JSON
# token NaN/Inf and the server would reject the whole batch.
#
# Perl's ithreads share nothing by default (see PerformanceFlusher's own comment), so the entries live
# in a threads::shared array of JSON strings: a flat shared array sidesteps sharing nested structures.
# The background thread is started lazily on the first record, like DeliveryQueue's. An END block
# flushes whatever is left when the program ends normally, which is what a short-lived cron script that
view all matches for this distribution
view release on metacpan or search on metacpan
bundle/Sys-CpuLoadX/include/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Form/Sensible/Reflector/MySQL.pm view on Meta::CPAN
$f->{field_type} = 'Text';
$f->{validation} = { code => $mysql_type =~ /unsigned/ ?
sub {
use Math::BigInt;
my $n = Math::BigInt->new( $_[0] );
# return '_FIELDNAME_ is an invalid unsigned big integer' if $n eq 'NaN';
return $self->i18n->{ubigint}->{nan} if $n eq 'NaN';
return $self->i18n->{ubigint}->{not_int} if not $n->is_int;
return $self->i18n->{ubigint}->{too_high} if $n > 8446744073709551615;
return $self->i18n->{ubigint}->{too_low} if $n < 0;
return 0;
}
: sub {
use Math::BigInt ':constant';
my $n = Math::BigInt->new( $_[0] );
return $self->i18n->{sbigint}->{nan} if $n eq 'NaN';
return $self->i18n->{sbigint}->{not_int} if not $n->is_int;
return $self->i18n->{sbigint}->{too_high} if $n > 9223372036854775807;
return $self->i18n->{sbigint}->{too_low} if $n < -9223372036854775808;
return 0;
}
lib/Form/Sensible/Reflector/MySQL.pm view on Meta::CPAN
elsif ($mysql_type =~ /^(double|real)/){
$f->{field_type} = 'Text';
$f->{validation} = { code => sub {
use Math::BigFloat ':constant';
my $n = Math::BigFloat->new( $_[0] );
return $self->i18n->{double}->{nan} if $n eq 'NaN';
return $self->i18n->{double}->{oob}
if ($n <= -1.7976931348623157E+308 and $n >= -2.2250738585072014E-308)
or $n== 0
or ($n <= 2.2250738585072014E-308 and $n >= 1.7976931348623157E+3080);
return 0;
view all matches for this distribution
view release on metacpan or search on metacpan
t/fields/number.t view on Meta::CPAN
## fail on fraction
$form->set_values({
string => 'a2z0to9',
numeric_integer => 'NaN',
numeric_step => 25.7,
numeric_nostep => 122.7,
exponent => '1.72e22',
});
view all matches for this distribution