view release on metacpan or search on metacpan
lib/A1z/HTML5/Template.pm view on Meta::CPAN
use warnings;
use vars qw($NAME);
# ABSTRACT: Fast and Easy Web Apps
sub NAME { my $self = shift; $NAME = "Fast and Easy Web Apps"; return $NAME; }
our $VERSION = '0.22';
use parent qw(Exporter);
require Exporter;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/A1z/Html.pm view on Meta::CPAN
package A1z::Html;
use vars qw($NAME);
# ABSTRACT: Web Utilities
sub NAME { my $self = shift; $NAME = "Web Utilities"; return $NAME; }
our $VERSION = '0.04';
sub new {
my $class = shift;
my $self = bless { @_ }, $class;
return $self;
}
sub welcome {
return qq{Welcome to Web Utilities};
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Devel/CheckLib.pm view on Meta::CPAN
This behaves exactly the same as C<assert_lib()> except that it is silent,
returning false instead of dieing, or true otherwise.
=cut
sub check_lib_or_exit {
eval 'assert_lib(@_)';
if($@) {
warn $@;
exit;
}
}
sub check_lib {
eval 'assert_lib(@_)';
return $@ ? 0 : 1;
}
# borrowed from Text::ParseWords
sub _parse_line {
my($delimiter, $keep, $line) = @_;
my($word, @pieces);
no warnings 'uninitialized'; # we will be testing undef strings
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AAC/Pvoice.pm view on Meta::CPAN
@EXPORT = qw (MessageBox);
@EXPORT_OK = qw ();
%EXPORT_TAGS = ();
}
sub MessageBox
{
my ($message, $caption, $style, $parent, $x, $y) = @_;
$caption ||= 'Message';
$style ||= wxOK;
$x ||= -1;
view all matches for this distribution
view release on metacpan or search on metacpan
Usage : $abi = ABI->new(-file=>"filename");
$abi = ABI->new("filename"); # same thing
=cut
sub new {
my $class = shift;
my $self = {};
bless $self, ref($class) || $class;
$self->_init(@_);
#print "****", $self->{_mac_header}, "\n";
return $self;
}
sub _init {
my ( $self, @args ) = @_;
my ($file) = $self->_rearrange( ["FILE"], @args );
if ( !defined($file) ) {
croak "Can't open the input file\n";
} else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AC/ConfigFile/Simple.pm view on Meta::CPAN
allow => \&parse_allow,
_default => \&parse_keyvalue,
);
sub new {
my $class = shift;
my $file = shift;
my $me = bless {
_laststat => $^T,
view all matches for this distribution
view release on metacpan or search on metacpan
eg/filelist.pm view on Meta::CPAN
use JSON;
use strict;
my $YDBFILE = "/data/files.ydb";
sub get_file_list {
my $config = shift;
# get files + metadata from yenta
my $yenta = AC::Yenta::Direct->new( 'files', $YDBFILE );
view all matches for this distribution
view release on metacpan or search on metacpan
eg/myself.pm view on Meta::CPAN
use Sys::Hostname;
use strict;
my $SERVERID;
sub init {
my $class = shift;
my $port = shift; # our tcp port
my $id = shift; # from cmd line
$SERVERID = $id;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ACL/Lite.pm view on Meta::CPAN
=back
=cut
sub new {
my ($class, $self, $type, %args);
$class = shift;
%args = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/postifx-policy-server.pl view on Meta::CPAN
our $pidfile = "/var/run/postfix-policy-server.pid";
our %redirectmap;
# Param1: Client socket
# Param2: hash_ref
sub parse_postfix_input( $$ ) {
my ($socket,$hashref) = @_;
local $/ = "\r\n";
while( my $line = <$socket> ){
chomp( $line );
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-report-prereqs.t view on Meta::CPAN
my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic
# Verify requirements?
my $DO_VERIFY_PREREQS = 1;
sub _max {
my $max = shift;
$max = ( $_ > $max ) ? $_ : $max for @_;
return $max;
}
sub _merge_prereqs {
my ($collector, $prereqs) = @_;
# CPAN::Meta::Prereqs object
if (ref $collector eq $cpan_meta_pre) {
return $collector->with_merged_prereqs(
view all matches for this distribution
view release on metacpan or search on metacpan
use vars q[$VERSION];
$VERSION = '0.01';
use Lingua::31337 qw[text231337];
*die_handler = *warn_handler = sub {
return text231337 @_;
};
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
use vars q[$VERSION];
$VERSION = '0.01';
use HTML::FromText;
*die_handler = *warn_handler = sub {
return text2html "@_",
paras => 1,
bold => 1,
metachars => 0,
urls => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
IgpayAtinlay.pm view on Meta::CPAN
use vars q[$VERSION];
$VERSION = '0.01';
use Lingua::Atinlay::Igpay qw[:all];
*die_handler = *warn_handler = sub {
my @errors = @_;
return enhay2igpayatinlay @errors;
};
1;
view all matches for this distribution
view release on metacpan or search on metacpan
Translate.pm view on Meta::CPAN
use Lingua::Translate;
{
my $translator = undef;
sub import {
my $class = shift;
$translator = Lingua::Translate->new( src => 'en', dest => shift );
}
*die_handler = *warn_handler = sub {
if ( $translator ) {
return map $translator->translate( $_ ), @_;
} else {
return @_;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ACME/Error.pm view on Meta::CPAN
use strict;
use vars qw[$VERSION];
$VERSION = '0.03';
sub import {
my $class = shift;
if ( my $style = shift ) {
my $package = qq[ACME::Error::$style];
my $args = join q[', '], @_;
eval qq[use $package '$args'];
die $@ if $@;
my $nested = -1;
{ no strict 'refs';
$SIG{__WARN__} = sub {
local $SIG{__WARN__};
$nested++;
my $handler = $package . q[::warn_handler];
warn &{$handler}(@_) unless $nested;
warn @_ if $nested;
$nested--;
};
$SIG{__DIE__} = sub {
local $SIG{__DIE__};
$nested++;
my $handler = $package . q[::die_handler];
die &{$handler}(@_) unless $nested;
die @_ if $nested;
$nested--;
};
}
# $SIG{__WARN__} = sub {
# my $handler = $package . q[::warn_handler];
# {
# no strict 'refs';
# warn &{$handler} , "\n" if exists &{$handler};
# }
# };
# $SIG{__DIE__} = sub {
# my $handler = $package . q[::die_handler];
# {
# no strict 'refs';
# die &{$handler}, "\n" if exists &{$handler};
# }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ACME/MBHall.pm view on Meta::CPAN
Returns the sum of the numbers.
=cut
sub sum {
my $sum = 0;
foreach my $value (@_) {
$sum+=$value;
}
return $sum;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ACME/QuoteDB.pm view on Meta::CPAN
use aliased 'ACME::QuoteDB::DB::Quote' => 'Quote';
binmode STDOUT, ':encoding(utf8)';
binmode STDERR, ':encoding(utf8)';
sub new {
my $class = shift;
my $self = bless {}, $class;
return $self;
}
# provide 1 non OO method for one liners
sub quote {
my ($arg_ref) = @_;
return get_quote(q{}, $arg_ref);
}
# list of quote attributions (names) (makes searching easier)
sub list_attr_names {
return _get_field_all_from('name', Attr->retrieve_all);
}
# list of quote categories
sub list_categories {
return _get_field_all_from('catg', Catg->retrieve_all);
}
## list of quote sources
sub list_attr_sources {
return _get_field_all_from('source', Quote->retrieve_all);
}
sub _get_field_all_from {
my ($field, @all_stored) = @_;
my $arr_ref = [];
RECORDS:
foreach my $f_obj (@all_stored){
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ACME/THEDANIEL/Utils.pm view on Meta::CPAN
=head2 sum
=cut
sub sum {
my $sum;
foreach my $num ( @_ ) {
if ( !looks_like_number( $num ) ) {
croak "Invalid input: $num"
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ACME/YAPC/NA/2012.pm view on Meta::CPAN
=head2 function1
=cut
sub function1 {
}
=head2 function2
=cut
sub function2 {
}
=head1 AUTHOR
Jacinta Richardson, C<< <jarich at cpan.org> >>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ACME/ltharris.pm view on Meta::CPAN
=head2 function1
=cut
sub function1 {
}
=head2 function2
=cut
sub function2 {
}
=head1 AUTHOR
L.T. Harris, C<< <lth at ltharris.com> >>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
*inc::Module::Install::VERSION = *VERSION;
@inc::Module::Install::ISA = __PACKAGE__;
}
sub import {
my $class = shift;
my $self = $class->new(@_);
my $who = $self->_caller;
#-------------------------------------------------------------
view all matches for this distribution