Aion

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN


                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

LICENSE  view on Meta::CPAN

    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

lib/Aion/Types.md  view on Meta::CPAN


```perl
123 ~~ Bin    # -> 1
"z" ~~ Bin    # -> 1
"↭" ~~ Bin    # -> ""
do {no utf8; "↭" ~~ Bin }   # -> ""
```

## StartsWith\[S]

The string starts with `S`.

```perl
"Hi, world!" ~~ StartsWith["Hi,"]	# -> 1
"Hi world!" ~~ StartsWith["Hi,"]	# -> ""
```

## EndsWith\[S]

The string ends with `S`.

lib/Aion/Types.md  view on Meta::CPAN


Web urls is string with prefix http:// or https://.

```perl
"http://" ~~ Url    # -> 1
"http:/" ~~ Url    # -> ""
```

## Path

The paths starts with a slash.

```perl
"/" ~~ Path     # -> 1
"/a/b" ~~ Path  # -> 1
"a/b" ~~ Path   # -> ""
```

## Html

The html starts with a `<!doctype` or `<html`.

```perl
"<HTML" ~~ Html            # -> 1
" <html" ~~ Html           # -> 1
" <!doctype html>" ~~ Html # -> 1
" <html1>" ~~ Html         # -> ""
```

## StrDate

lib/Aion/Types.pm  view on Meta::CPAN


Binary strings: without utf8-flag and octets with numbers less then 128.

	123 ~~ Bin    # -> 1
	"z" ~~ Bin    # -> 1
	"↭" ~~ Bin    # -> ""
	do {no utf8; "↭" ~~ Bin }   # -> ""

=head2 StartsWith[S]

The string starts with C<S>.

	"Hi, world!" ~~ StartsWith["Hi,"]	# -> 1
	"Hi world!" ~~ StartsWith["Hi,"]	# -> ""

=head2 EndsWith[S]

The string ends with C<S>.

	"Hi, world!" ~~ EndsWith["world!"]	# -> 1
	"Hi, world" ~~ EndsWith["world!"]	# -> ""

lib/Aion/Types.pm  view on Meta::CPAN


=head2 Url

Web urls is string with prefix http:// or https://.

	"http://" ~~ Url    # -> 1
	"http:/" ~~ Url    # -> ""

=head2 Path

The paths starts with a slash.

	"/" ~~ Path     # -> 1
	"/a/b" ~~ Path  # -> 1
	"a/b" ~~ Path   # -> ""

=head2 Html

The html starts with a C<< E<lt>!doctype >> or C<< E<lt>html >>.

	"<HTML" ~~ Html            # -> 1
	" <html" ~~ Html           # -> 1
	" <!doctype html>" ~~ Html # -> 1
	" <html1>" ~~ Html         # -> ""

=head2 StrDate

The date is format C<yyyy-mm-dd>.

t/aion/types.t  view on Meta::CPAN

# 
done_testing; }; subtest 'Bin' => sub { 
::is scalar do {123 ~~ Bin}, scalar do{1}, '123 ~~ Bin    # -> 1';
::is scalar do {"z" ~~ Bin}, scalar do{1}, '"z" ~~ Bin    # -> 1';
::is scalar do {"↭" ~~ Bin}, scalar do{""}, '"↭" ~~ Bin    # -> ""';
::is scalar do {do {no utf8; "↭" ~~ Bin }}, scalar do{""}, 'do {no utf8; "↭" ~~ Bin }   # -> ""';

# 
# ## StartsWith\[S]
# 
# The string starts with `S`.
# 
done_testing; }; subtest 'StartsWith\[S]' => sub { 
::is scalar do {"Hi, world!" ~~ StartsWith["Hi,"]}, scalar do{1}, '"Hi, world!" ~~ StartsWith["Hi,"]	# -> 1';
::is scalar do {"Hi world!" ~~ StartsWith["Hi,"]}, scalar do{""}, '"Hi world!" ~~ StartsWith["Hi,"]	# -> ""';

# 
# ## EndsWith\[S]
# 
# The string ends with `S`.
# 

t/aion/types.t  view on Meta::CPAN

# 
# Web urls is string with prefix http:// or https://.
# 
done_testing; }; subtest 'Url' => sub { 
::is scalar do {"http://" ~~ Url}, scalar do{1}, '"http://" ~~ Url    # -> 1';
::is scalar do {"http:/" ~~ Url}, scalar do{""}, '"http:/" ~~ Url    # -> ""';

# 
# ## Path
# 
# The paths starts with a slash.
# 
done_testing; }; subtest 'Path' => sub { 
::is scalar do {"/" ~~ Path}, scalar do{1}, '"/" ~~ Path     # -> 1';
::is scalar do {"/a/b" ~~ Path}, scalar do{1}, '"/a/b" ~~ Path  # -> 1';
::is scalar do {"a/b" ~~ Path}, scalar do{""}, '"a/b" ~~ Path   # -> ""';

# 
# ## Html
# 
# The html starts with a `<!doctype` or `<html`.
# 
done_testing; }; subtest 'Html' => sub { 
::is scalar do {"<HTML" ~~ Html}, scalar do{1}, '"<HTML" ~~ Html            # -> 1';
::is scalar do {" <html" ~~ Html}, scalar do{1}, '" <html" ~~ Html           # -> 1';
::is scalar do {" <!doctype html>" ~~ Html}, scalar do{1}, '" <!doctype html>" ~~ Html # -> 1';
::is scalar do {" <html1>" ~~ Html}, scalar do{""}, '" <html1>" ~~ Html         # -> ""';

# 
# ## StrDate
# 



( run in 0.460 second using v1.01-cache-2.11-cpan-0d8aa00de5b )