view release on metacpan or search on metacpan
applications/htmlroot/cgi-bin/admin/countries.pl view on Meta::CPAN
if ($action eq 'duplicateView' or $action eq 'editView' or $action eq 'insertView') {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
print <<HTML;
<script language="JavaScript1.2" type="text/javascript">
function validateForm() {
if ( document.countries.countryID.value == null || document.countries.countryID.value == '' ) {
document.countries.countryID.focus();
alert('Please enter a country ID!');
return false;
applications/htmlroot/cgi-bin/admin/countries.pl view on Meta::CPAN
return true;
}
</script>
<form action="$ENV{SCRIPT_NAME}" method="post" name="countries" onSubmit="return validateForm();">
HTML
} elsif ($action eq 'deleteView') {
print_header (*STDOUT, $pagedir, $pageset, $htmlTitle, $subTitle, 3600, '', 'F', '', $sessionID);
print "<form action=\"" . $ENV{SCRIPT_NAME} . "\" method=\"post\" name=\"countries\">\n";
$pageNo = 1; $pageOffset = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ASP4.pm view on Meta::CPAN
sub run {
my ($self, $context) = @_;
# If there is an error, return the user to the registration page:
if( my $errors = $self->validate() ) {
$Session->{validation_errors} = $errors;
$Session->{__lastArgs} = $Form;
$Session->save;
return $Response->Redirect( $ENV{HTTP_REFERER} );
}
lib/ASP4.pm view on Meta::CPAN
# Redirect to /profile.asp:
return $Response->Redirect("/profile.asp");
}# end if()
}
sub validate {
my ($self) = @_;
$self->trim_form;
my $errors = { };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ASP4x/Captcha/Imager.pm view on Meta::CPAN
border: dotted 1px #AAA;
}
</style>
</head>
<body>
<form action="/handlers/dev.validate" method="post">
<p>
<label>Enter the code you see below:</label>
<input type="text" name="security_code" />
</p>
<p>
lib/ASP4x/Captcha/Imager.pm view on Meta::CPAN
</body>
</html>
=head2 Validate the Captcha
package dev::validate;
use strict;
use warnings 'all';
use base 'ASP4::FormHandler';
use vars __PACKAGE__->VARS;
view all matches for this distribution
view release on metacpan or search on metacpan
utilize|||
uvchr_to_utf8_flags||5.007003|
uvchr_to_utf8|||
uvuni_to_utf8_flags||5.007003|
uvuni_to_utf8||5.007001|
validate_suid|||
varname|||
vcmp||5.009000|
vcroak||5.006000|
vdeb||5.007003|
vform||5.006000|
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/IP.pm view on Meta::CPAN
sub new
{
croak 'Incorrect number of args passed to AWS::IP->new()' unless @_ >= 2 && @_ <= 3;
my ($class, $cache_timeout_secs, $cache_path) = @_;
# validate args
unless ($cache_timeout_secs
&& $cache_timeout_secs =~ /^[0-9]+$/)
{
croak 'Error argument cache_timeout_secs must be a positive integer';
}
view all matches for this distribution
view release on metacpan or search on metacpan
author/regions-x86_64.txt
author/update-aws-lambda-al.pl
author/update-aws-lambda-al2.pl
author/update-aws-lambda-al2023.pl
author/update-dependencies.sh
author/validate-account.sh
author/validate-template.sh
cpanfile
examples/cgi/Makefile
examples/cgi/README.md
examples/cgi/WwwCounter/0.gif
examples/cgi/WwwCounter/1.gif
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/S3/Signer/V4.pm view on Meta::CPAN
$uri->query_param( 'X-Amz-Date' => $self->_datetime($request) );
$uri->query_param( 'X-Amz-Expires' => $expires ) if $expires;
$uri->query_param( 'X-Amz-SignedHeaders' => 'host' );
# If there was a security token passed, we need to supply it as part of the authorization
# because AWS requires it to validate IAM Role temporary credentials.
if ( defined( $self->{security_token} ) ) {
$uri->query_param( 'X-Amz-Security-Token' => $self->{security_token} );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/SNS/Verify.pm view on Meta::CPAN
my $self = shift;
return Crypt::PK::RSA->new(\$self->certificate_string);
}
);
has validate_signing_cert_url => (
is => 'ro',
lazy => 1,
default => 1,
);
lib/AWS/SNS/Verify.pm view on Meta::CPAN
sub valid_cert_url {
my $self = shift;
my ($url_string) = @_;
$url_string ||= '';
return $url_string unless $self->validate_signing_cert_url;
my $url = URI::URL->new($url_string);
unless ( $url->can('host') ) {
ouch 'Bad SigningCertURL', "The SigningCertURL ($url_string) isn't a valid URL", $self;
}
lib/AWS/SNS/Verify.pm view on Meta::CPAN
return $sns->message;
}
=head1 DESCRIPTION
This module will parse a message from Amazon Simple Notification Service and validate its signature. This way you know the message came from AWS and not some third-party. More info here: L<http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.ve...
=head1 METHODS
=head2 new
lib/AWS/SNS/Verify.pm view on Meta::CPAN
By default AWS::SNS::Verify will fetch the certificate string by issuing an HTTP GET request to C<SigningCertURL>. The SigningCertURL in the message must be a AWS SNS endpoint.
If you wish to use a cached version, then pass it in.
=item validate_signing_cert_url (default: true)
If you're using a fake SNS server in your local test environment, the SigningCertURL won't be an AWS endpoint. If so, set validate_signing_cert_url to 0.
Don't ever do this in any kind of Production environment.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AWS/Signature4.pm view on Meta::CPAN
$uri->query_param('X-Amz-Date' => $self->_datetime($request));
$uri->query_param('X-Amz-Expires' => $expires) if $expires;
$uri->query_param('X-Amz-SignedHeaders' => 'host');
# If there was a security token passed, we need to supply it as part of the authorization
# because AWS requires it to validate IAM Role temporary credentials.
if (defined($self->{security_token})) {
$uri->query_param('X-Amz-Security-Token' => $self->{security_token});
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/AXLSoap.xsd view on Meta::CPAN
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="rules">
<xsd:annotation>
<xsd:documentation>The rules to validate this parameter against.</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="rule" type="xsd:anyURI" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>The URI of the rule to validate this parameter against; for example: xmlrule://cisco.com/public/isAnInteger</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
share/AXLSoap.xsd view on Meta::CPAN
<xsd:element name="filter" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="XDateRule">
<xsd:annotation>
<xsd:documentation>Directs the rule processor to validate the input as a date. Valid date formats are Any, Long (March 15, 2001), Short-US (the default, 03/15/01), and Short-EU (15/03/01).</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="dateFormat" default="Short-US" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
share/AXLSoap.xsd view on Meta::CPAN
<xsd:enumeration value="Remotedestination already refer to a Remote Destionation Profile. You cannot associate it to Dual Mode device or a MobileSmartClient"/>
<xsd:enumeration value="Remote Destination must reference a Remote Destionation Profile, a Dual Mode device or a MobileSmartClient"/>
<xsd:enumeration value="Remote Destination can only be assigned to a single device as Dual Mode device and/or MobileSmartClient"/>
<xsd:enumeration value="Mobile Smart Client for a Remote Destination must be a device with Mobile Smart Client Enabled"/>
<xsd:enumeration value="This ToDAccess is already associated with another Remote Destination.There must be a different ToDAccess for each Remote Destination."/>
<xsd:enumeration value="Fail to validate the primary phone configuration."/>
<xsd:enumeration value="The device cannot be configured as a secondary phone."/>
<xsd:enumeration value="The device does not have a valid phone for its primary phone."/>
<xsd:enumeration value="The primary phone for the device can not be a secondary phone."/>
<xsd:enumeration value="A phone may be referenced as a primary phone by 2 other phones at most."/>
<xsd:enumeration value="The device must use the same or fewer DLUs as its primary phone."/>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Abstract/Meta/Attribute.pm view on Meta::CPAN
$args{data_type_validation} = 1
if (! exists($args{data_type_validation})
&& ($type eq '@' || $type eq '%' || $args{associated_class}));
$options{'&.' . $_ } = $args{$_}
for grep {exists $args{$_}} (qw(on_read on_change on_validate));
my $storage_key = $storage_type eq 'Array' ? $attribute_index : $args{storage_key} || $args{name};
$options{'$.name'} = $accessor_name;
lib/Abstract/Meta/Attribute.pm view on Meta::CPAN
my ($self, $attribute, $scope, $value, $key) = @_;
if($scope eq 'mutator') {
my $hash = $$value;
foreach my $k (keys %$hash) {
# do some stuff
#$self->validate_trigger($k, $hash->{$k});
}
} else {
# do some stuff
$self->validate_trigger($key. $$value);
}
$self;
});
=cut
lib/Abstract/Meta/Attribute.pm view on Meta::CPAN
=item on_validate
Returns on validate code reference.
It is executed before the data type validation happens.
=cut
sub on_validate { shift()->{'&.on_validate'} }
=item set_on_validate
Sets code reference that will be replace data read routine
my $attr = MyClass->meta->attribute('attrs');
$attr->set_on_read(sub {
lib/Abstract/Meta/Attribute.pm view on Meta::CPAN
#do some stuff
});
=cut
sub set_on_validate {
my ($attr, $value) = @_;
$attr->{'&.on_validate'} = $value;
my $meta= $attr->class->meta;
$meta->install_attribute_methods($attr, 1);
}
view all matches for this distribution
view release on metacpan or search on metacpan
}
sub _alert_iterators {
my $self = shift;
foreach (keys %{$self->{iterators}}) {
$self->{iterators}{$_}->invalidate if $self->{iterators}{$_};
}
undef $self->{active_list};
}
sub asString {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
if ( $osi and $license_text =~ /All rights reserved/i ) {
print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
}
$self->license($license);
return 1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
if ( $osi and $license_text =~ /All rights reserved/i ) {
print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
}
$self->license($license);
return 1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/https_mojolicious.io_blog_2017_12_16_day-16-the-secret-life-of-sessions view on Meta::CPAN
<p>During each request, the <a href="http://mojolicious.org/perldoc/Mojolicious/Controller#session">session</a> is just another hash reference attached to the controller, in some ways like the <a href="/blog/2017/12/02/day-2-the-stash">stash</a>, exc...
Mojolicious does this by encoding the structure, first as JSON then Base64.
It then signs the resulting string using HMAC-SHA1 and the application's <a href="http://mojolicious.org/perldoc/Mojolicious#secrets">secret</a> to prevent tampering and stores it as a cookie on the response to the client.</p>
<p>On subsequent requests, the client sends the cookie along with the request (as cookies do).
Mojolicious then checks if the document and signature validate against the secret, if so the cookie is decoded and made available again via the session method.</p>
<p>Two important things to note.
First, though the data is safe from tampering, it isn't encrypted; a savvy user can decode the cookie and see the stored data, so don't put anything in it that shouldn't be seen.
Second, this is only useful if the secret is strong and safe.
If not, the client could forge a cookie that appeared to come from your application, possibly with catastrophic results!
devdata/https_mojolicious.io_blog_2017_12_16_day-16-the-secret-life-of-sessions view on Meta::CPAN
</code></pre>
<p>and visit <code>localhost:3000</code> you should see a counter that increments on each request.
That data is stored on the client (e.g. in the browser) between each request and is incremented on the server before sending it back to the client.
Each response is a new cookie with the new session data and a new cookie expiration time, <a href="http://mojolicious.org/perldoc/Mojolicious/Sessions#default_expiration">defaulting to one hour</a> from issue.
This also therefore implies that as long as you visit often enough (before any one cookie expires) and your data continues to validate against the secret, your session can last forever.</p>
<h2>Secret Security</h2>
<p>Now, one other thing you should see is that in your application's log output, you should have a message like</p>
devdata/https_mojolicious.io_blog_2017_12_16_day-16-the-secret-life-of-sessions view on Meta::CPAN
Congratulations, you have a safer application already!</p>
<p>If sometime later, you suspect that someone has guessed your secret, or if your secret leaks out, you can change that secret and restart your application.
This will protect your application from malicious users.</p>
<p>For your clients, this will have the jarring effect that all existing sessions will be invalidated.
In the example application the counter would be reset.
If instead the session were being used to keep users logged in, they would suddenly be logged out.
If it was for tracking a shopping cart ... no more shopping cart.</p>
<p>This can actually be useful even if your secret is safe but you want to force-invalidate sessions for some other reason, like say your application was generating corrupt data or worse.
Generally, however, this is something you'd like to avoid.</p>
<h2>A Random Secret?</h2>
<p>Now perhaps you are asking yourself, if Mojolicious knows I'm using the insecure default couldn't it just set a random secret?
devdata/https_mojolicious.io_blog_2017_12_16_day-16-the-secret-life-of-sessions view on Meta::CPAN
</code></pre>
<p>So why isn't this recommended?
Because it would mean that each time you started the server you would get a new secret.
As with the case of changing your secret intentionally above, all existing sessions would be invalidated any time you wanted to reboot a server or restart the server process.
Additionally you could only use one server, any load balancing scenario would result in different secrets on different hosts, your users would randomly invalidate their sessions depending on which server they hit!</p>
<h2>Forward Secrecy</h2>
<p>Just as you have to change application passwords from time to time, so too you need to change your secret.
In a brute force scenario, a nefarious user could take one of their cookies and try to reverse engineer the secret that was used to generate it.</p>
<p>But wait!
You just said that changing the secret to prevent brute forcing will invalidate all of our sessions!</p>
<p>Remember when I pointed out that rather than being a single value, <code>secrets</code> was an array reference?
Well when Mojolicious generates a session cookie, it does so using the first value in the array reference.
However, when it validates session signatures, it will check them against each secret in the array.</p>
<p>So, say the time has come to rotate our secrets so we generate another</p>
<pre><code>$ </dev/urandom base64 | head -c 12
w8S4b+90CWwf
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/https_mojolicious.io_blog_2018_12_08_authenticating-with-ldap_ view on Meta::CPAN
</code></pre>
<p>Y'know, I'm sitting here on the Group W bench thinkin' ...
if I'm going to re-write this whole tutorial, maybe I should've started with
<a href="https://metacpan.org/pod/Mojolicious::Plugin::Authentication">Mojolicious::Plugin::Authentication</a>
and taken you through the code you needed for the <code>validate_user</code> option in the Plugin.
But let's leave that for next year.</p>
<p>Further reading on storing passwords:</p>
<ul>
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/http_advent.perldancer.org_2018_13 view on Meta::CPAN
important of which being the migration from <code>MooX::Types</code> to <code>Type::Tiny</code>.
When <code>Type::Tiny::XS</code> is used, the boost is even more significant.</p>
<h2><a name="security_improvements"></a>Security Improvements</h2>
<p>Two important security features were added:</p>
<p>The session engine now requires a <code>validate_id()</code> method to be implemented in
the various session engines. This requirement shuts down an attack vector by
making session IDs conform to a known format.</p>
<p>SysPete implemented a <code>change_session_id</code> keyword to easily change the
current session ID. This is a common (and recommended) security practice,
especially when privilege level changes within an application.</p>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
if ( $osi and $license_text =~ /All rights reserved/i ) {
warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
}
$self->license($license);
return 1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
if ( $osi and $license_text =~ /All rights reserved/i ) {
warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
}
$self->license($license);
return 1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Dice.pm view on Meta::CPAN
sub roll_dice {
my $raw_args = @_ == 1 ? shift : {@_};
# no need to check params if coming from roll_craps
my $args =
delete( $raw_args->{skip_validate} )
? $raw_args
: _validate_params($raw_args);
my @rolls;
my $roll_total = 0;
for ( 1 .. $args->{dice} ) {
my $roll = ( int( rand( $args->{sides} ) ) + 1 );
lib/Acme/Dice.pm view on Meta::CPAN
my @rolls;
push(
@rolls,
roll_dice(
skip_validate => 1,
dice => 1,
sides => 6,
favor => 3,
bias => $bias
)
);
push(
@rolls,
roll_dice(
skip_validate => 1,
dice => 1,
sides => 6,
favor => 4,
bias => $bias
)
);
return wantarray ? @rolls : $rolls[0] + $rolls[1];
}
sub _validate_params {
my $raw_args = @_ == 1 ? shift : {@_};
my $args = {};
my @errors;
lib/Acme/Dice.pm view on Meta::CPAN
'RTFM! Unknown params: ' . join( ', ', keys( %{$raw_args} ) ) )
if keys( %{$raw_args} );
croak join( "\n", @errors ) if @errors;
# validate individual params now
push( @errors, "Illegal value for 'dice': $args->{dice}" )
if $args->{dice} < 1;
push( @errors, "Really? Roll $args->{dice} dice?" ) if $args->{dice} > 100;
push( @errors, "Illegal value for 'sides': $args->{sides}" )
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
if ( $osi and $license_text =~ /All rights reserved/i ) {
warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
}
$self->license($license);
return 1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
if ( $osi and $license_text =~ /All rights reserved/i ) {
print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
}
$self->license($license);
return 1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ICan/tSpell.pm view on Meta::CPAN
attributes (
tiny => [Object, {lzy, default => sub {HTTP::Tiny->new}}],
base_url => [Str, {lzy, default => 'http://www.google.com/search?gws_rd=ssl&hl=en&q='}],
);
validate_subs (
get => { params => [ [Str] ], returns => [[HashRef]] },
spell_check => {
params => { check => [Str], base_url => [Str, 'base_url'] },
returns => [[Str]],
},
view all matches for this distribution
view release on metacpan or search on metacpan
script/gen-generic-ind-company-names view on Meta::CPAN
### begin code_after_shebang
# Note: This script is a CLI for Riap function /Acme/ID/CompanyName/gen_generic_ind_company_names
# and generated automatically using Perinci::CmdLine::Gen version 0.498
### end code_after_shebang
# PERICMD_INLINE_SCRIPT: {"code_after_shebang":"...","config_dirs":null,"config_filename":"gen-generic-ind-company-names.conf","env_name":"GEN_GENERIC_IND_COMPANY_NAMES_OPT","include":null,"log":null,"pack_deps":1,"pod":0,"read_config":1,"read_env":1...
my $_pci_metas = {""=>{args=>{add_prefixes=>{default=>1,schema=>["bool",{req=>1},{}]},add_suffixes=>{default=>1,schema=>["bool",{req=>1},{}]},desired_initials=>{schema=>["str",{match=>qr(\A[A-Za-z]+\z),min_len=>1,req=>1},{}]},num_names=>{cmdline_alia...
# This script is generated by Perinci::CmdLine::Inline version 0.551 on Fri May 7 20:03:14 2021.
script/gen-generic-ind-company-names view on Meta::CPAN
You can also put configuration for multiple programs inside a single file, and use filter C<program=NAME> in section names, e.g. C<[program=NAME ...]> or C<[SOMESECTION program=NAME]>. The section will then only be used when the reading program match...
You can also filter a section by environment variable using the filter C<env=CONDITION> in section names. For example if you only want a section to be read if a certain environment variable is true: C<[env=SOMEVAR ...]> or C<[SOMESECTION env=SOMEVAR ...
To load and configure plugins, you can use either the C<-plugins> parameter (e.g. C<< -plugins=DumpArgs >> or C<< -plugins=DumpArgs@before_validate_args >>), or use the C<[plugin=NAME ...]> sections, for example:
[plugin=DumpArgs]
-event=before_validate_args
-prio=99
[plugin=Foo]
-event=after_validate_args
arg1=val1
arg2=val2
which is equivalent to setting C<< -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2 >>.
List of available configuration parameters:
add_prefixes (see --no-add-prefixes)
add_suffixes (see --no-add-suffixes)
script/gen-generic-ind-company-names view on Meta::CPAN
# # Data::Sah can also create validator that returns nice error message string
# # and/or coerced value. Data::Sah can even create validator that targets other
# # language, like JavaScript. All from the same schema. See its documentation
# # for more details.
#
#To validate function parameters against this schema (requires L<Params::Sah>):
#
# use Params::Sah qw(gen_validator);
#
# sub myfunc {
# my @args = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
if ( $osi and $license_text =~ /All rights reserved/i ) {
print "WARNING: 'All rights reserved' in copyright may invalidate Open Source license.\n";
}
$self->license($license);
return 1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Lingua/ZH/Remix.pm view on Meta::CPAN
Instance method. Optionally takes "min" or "max" parameter as the constraint of
sentence length (number of characters).
Both min and max values are required to be integers greater or equal to
zero. The value of max should be greater then the value of min. If any of these
values are invalidate, it is treated as if they are not passed.
The default values of min, max are 0 and 140, respectively.
The implementation random algorthm based, thus it needs indefinite time to
generate the result. If it takes more then 1000 iterations, it aborts and return
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s{\s+}{\\s+}g;
if ( $license_text =~ /\b$pattern\b/i ) {
if ( $osi and $license_text =~ /All rights reserved/i ) {
warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
}
$self->license($license);
return 1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Inline.pm view on Meta::CPAN
) {
eval "require $o->{INLINE}{ILSM_module}";
croak M05_error_eval('glue', $@) if $@;
$o->push_overrides;
bless $o, $o->{INLINE}{ILSM_module};
$o->validate(@config);
}
else {
$o->{CONFIG} = {(%{$o->{CONFIG}}, @config)};
}
$o->print_info if $o->{CONFIG}{PRINT_INFO};
inc/Inline.pm view on Meta::CPAN
) {
eval "require $o->{INLINE}{ILSM_module}";
croak M05_error_eval('glue', $@) if $@;
$o->push_overrides;
bless $o, $o->{INLINE}{ILSM_module};
$o->validate(@config);
}
$o->load;
$o->pop_overrides;
}
inc/Inline.pm view on Meta::CPAN
}
sub M31_inline_open_failed {
my ($file) = @_;
return <<END;
Can't open Inline validate file:
$file
$!
view all matches for this distribution