Result:
found more than 501 distributions - search limited to the first 2001 files matching your query ( run in 1.055 )


Acme-Timecube

 view release on metacpan or  search on metacpan

lib/Acme/Timecube.pm  view on Meta::CPAN

    my $tc = Acme::Timecube->new();

    # Preach cubic wisdom
    $tc->preach;

    # Deliver a discourse on 4 corner day logic
    $tc->discourse;

    # A lecture on why you are a stupid educated fool
    $tc->lecture;

 view all matches for this distribution


Acme-Tools

 view release on metacpan or  search on metacpan

Tools.pm  view on Meta::CPAN

  decode_num
  between
  btw
  curb
  bound
  log10
  log2
  logn
  distinct
  in
  in_num
  uniq
  union

Tools.pm  view on Meta::CPAN

  bfdimensions
  $PI
  install_acme_command_tools

  $Dbh
  dlogin
  dlogout
  drow
  drows
  drowc
  drowsc
  dcols

Tools.pm  view on Meta::CPAN

   !defined$s     ? undef
  :!length($s)    ? ''
  :$s<0           ? '-'.sec_readable(-$s)
  :$s<60 && int($s)==$s
                  ? $s."s"
  :$s<60          ? sprintf("%.*fs",int(3+-log($s)/log(10)),$s)
  :$s<3600        ? int($s/60)."m " .($s%60)        ."s"
  :$s<24*3600     ? int($s/$h)."h " .int(($s%$h)/60)."m"
  :$s<366*24*3600 ? int($s/$d)."d " .int(($s%$d)/$h)."h"
  :                 int($s/$y)."yr ".int(($s%$y)/$d)."d";
}

Tools.pm  view on Meta::CPAN

    }
  }
  return fractional($n) if !$l and !recursed() and $dec>6 and substr($n,-1) and substr($n,-1)--;
  print "l=$l max=$max\n";
  $ne="9" x $l;
  print log($n),"\n";
  my $st=sub{print "status: ".($te/$ne)."   n=$n   ".($n/$te*$ne)."\n"};
  while($n/$te*$ne<0.99){ &$st(); $ne*=10 }
  while($te/$n/$ne<0.99){ &$st(); $te*=10 }
  &$st();
  while(1){

Tools.pm  view on Meta::CPAN

  $val > $max ? $max :
                $val;
}
sub bound { curb(@_) }

=head2 log10

=head2 log2

=head2 logn

 print log10(1000);                  # prints 3
 print log10(10000*sqtr(10));        # prints 4.5
 print log2(16);                     # prints 4
 print logn(4096, 8);                # prints 4 (12/3=4)
 print logn($PI, 2.71828182845905);  # same as  print log($PI)  using perls builtin log()

=cut

sub log10 { log($_[0]) / log(10)    }
sub log2  { log($_[0]) / log(2)     }
sub logn  { log($_[0]) / log($_[1]) }

=head1 STRINGS

=head2 upper

Tools.pm  view on Meta::CPAN


Returns the I<geometric average> (a.k.a I<geometric mean>) of a list of numbers.

 print geomavg(10,100,1000,10000,100000);               # 1000
 print 0+ (10*100*1000*10000*100000) ** (1/5);          # 1000 same thing
 print exp(avg(map log($_),10,100,1000,10000,100000));  # 1000 same thing, this is how geomavg() works internally

=cut

sub geomavg { exp(avg(map log($_), @_)) }

=head2 harmonicavg

Returns the I<harmonic average> (a.k.a I<geometric mean>) of a list of numbers. L<http://en.wikipedia.org/wiki/Harmonic_mean>

Tools.pm  view on Meta::CPAN

    do {
      $x1=2.0*rand()-1.0;
      $x2=2.0*rand()-1.0;
      $w=$x1*$x1+$x2*$x2;
    } while $w>=1.0;
    $w=sqrt(-2.0*log($w)/$w) * $stddev;
    push @r,  $x1*$w + $avg,
              $x2*$w + $avg;
  }
  pop @r if @r > $num;
  return $r[0] if @_<3;

Tools.pm  view on Meta::CPAN

C<%Acme::Tools::IPADDR_memo> hash) so only the first loopup on a
particular IP number might take some time.

Some few DNS loopups can take several seconds.
Most is done in a fraction of a second. Due to this slowness, medium to high traffic web servers should
probably turn off hostname lookups in their logs and just log IP numbers by using
C<HostnameLookups Off> in Apache C<httpd.conf> and then use I<ipaddr> afterwards if necessary.

=cut

our %IPADDR_memo;

Tools.pm  view on Meta::CPAN


Extentions C<.gz>, C<.bz2> and C<.xz> are recognized for decompression. See also C<writefile()> and C<openstr()>.

=cut

#http://blogs.perl.org/users/leon_timmermans/2013/05/why-you-dont-need-fileslurp.html
#todo: readfile with grep-filter code ref in a third arg (avoid reading all into mem)

sub readfile {
  my($filename,$ref)=@_;
  if(@_==1){

Tools.pm  view on Meta::CPAN

meaning and is replaced by color codings depending on the letter
following the C<¤>.

B<Output:> The same string, but with C<¤letter> replaced by ANSI color
codes respected by many types terminal windows. (xterm, telnet, ssh,
telnet, rlog, vt100, cygwin, rxvt and such...).

B<Codes for ansicolor():>

 ¤r red
 ¤g green

Tools.pm  view on Meta::CPAN


Input, two numeric arguments: Capacity and error_rate.

Outputs an array of two numbers: m and k.

  m = - n * log(p) / log(2)**2   # n = capacity, m = bits in filter (divide by 8 to get bytes)
  k = log(1/p) / log(2)          # p = error_rate, uses perls internal log() with base e (2.718)

...that is: m = the best number of bits in the filter and k = the best
number of hash functions optimized for the given capacity (n) and
error_rate (p). Note that k is a dependent only of the error_rate.  At
about two percent error rate the bloom filter needs just the same

Tools.pm  view on Meta::CPAN


=head2 Theory and math behind bloom filters

L<http://www.internetmathematics.org/volumes/1/4/Broder.pdf>

L<http://blogs.sun.com/jrose/entry/bloom_filters_in_a_nutshell>

L<http://pages.cs.wisc.edu/~cao/papers/summary-cache/node8.html>

See also Scaleable Bloom Filters: L<http://gsd.di.uminho.pt/members/cbm/ps/dbloom.pdf> (not implemented in Acme::Tools)

Tools.pm  view on Meta::CPAN

  my($n,$p,$mink,$maxk, $k,$flen,$m)=
    @_==1 ? (@{$_[0]}{'capacity','error_rate','min_hashfuncs','max_hashfuncs'},1)
   :@_==2 ? (@_,1,100,1)
          : croak "Wrong number of arguments (".@_."), should be 2";
  croak "p ($p) should be > 0 and < 1" if not ( 0<$p && $p<1 );
  $m=-1*$_*$n/log(1-$p**(1/$_)) and (!defined $flen or $m<$flen) and ($flen,$k)=($m,$_) for $mink..$maxk;
  $flen = int(1+$flen);
  return ($flen,$k);
}
sub bfdimensions {
  my($n,$p,$mink,$maxk)=
    @_==1 ? (@{$_[0]}{'capacity','error_rate','min_hashfuncs','max_hashfuncs'})
   :@_==2 ? (@_,1,100)
          : croak "Wrong number of arguments (".@_."), should be 2";
  my $k=log(1/$p)/log(2);           # k hash funcs
  my $m=-$n*log($p)/log(2)**2;      # m bits in filter
  return ($m+0.5,min($maxk,max($mink,int($k+0.5))));
}

#crontab -e
#01 4,10,16,22 * * * /usr/bin/perl -MAcme::Tools -e'Acme::Tools::_update_currency_file("/var/www/html/currency-rates")' > /dev/null 2>&1

Tools.pm  view on Meta::CPAN


sub cmd_rttop   { die "rttop: not implemented here yet.\n" }
sub cmd_whichpm { die "whichpm: not implemented here yet.\n" } #-a (all, inkl VERSION og ls -l)
sub cmd_catal   { die "catal: not implemented here yet.\n" } #-a (all, inkl VERSION og ls -l)
#todo: cmd_tabdiff (fra sonyk)
#todo: cmd_catlog (ala catal med /etc/catlog.conf, default er access_log)

=head1 DATABASE STUFF - NOT IMPLEMENTED YET

Uses L<DBI>. Comming soon...

  $Dbh
  dlogin
  dlogout
  drow
  drows
  drowc
  drowsc
  dcols

Tools.pm  view on Meta::CPAN

  die;
}

our($Dbh,@Dbh,%Sth);
our %Dbattr=(RaiseError => 1, AutoCommit => 0); #defaults
sub dlogin {
  my $connstr=shift();
  my %attr=(%Dbattr,@_);
  my $type=dtype($connstr);
  my($dsn,$u,$p)=('','','');
  if($type eq 'SQLite'){

Tools.pm  view on Meta::CPAN

  }
  elsif($type eq 'Pg'){
    croak "todo";
  }
  else{
    croak "dblogin: unknown database type for connection string $connstr\n";
  }
  $dsn="dbi:$type:$dsn";
  push @Dbh, $Dbh if $Dbh; #local is better?
  require DBI;
  $Dbh=DBI->connect($dsn,$u,$p,\%attr); #connect_cached?
}
sub dlogout {
  $Dbh->disconnect;
  $Dbh=pop@Dbh if @Dbh;
}
sub drow {
  my($q,@b)=_dattrarg(@_);

Tools.pm  view on Meta::CPAN

# memoize_limit_size() #lru
# memoize_file_limit_size()
# memoize_memcached         http://search.cpan.org/~dtrischuk/Memoize-Memcached-0.03/lib/Memoize/Memcached.pm
# hint on http://perl.jonallen.info/writing/articles/install-perl-modules-without-root

# sub mycrc32 {  #http://billauer.co.il/blog/2011/05/perl-crc32-crc-xs-module/  eller String::CRC32::crc32 som er 100 x raskere enn Digest::CRC::crc32
#  my ($input, $init_value, $polynomial) = @_;
#  $init_value = 0 unless (defined $init_value);
#  $polynomial = 0xedb88320 unless (defined $polynomial);
#  my @lookup_table;
#  for (my $i=0; $i<256; $i++) {

Tools.pm  view on Meta::CPAN

                  Array subs: joinr perm permute permute_continue pile sortby subarrays
                  Other subs: btw in_iprange ipnum_ok iprange_ok opts s2t

 0.24  Feb 2019   fixed failes on perl 5.16 and older

 0.23  Jan 2019   Subs: logn, egrep, which. More UTF-8 "oriented" (lower, upper, ...)
                  Commands: zsize, finddup, due (improved), conv (improved, [MGT]?Wh
                  and many more units), due -M for stdin of filenames.

 0.22  Feb 2018   Subs: subarr, sim, sim_perm, aoh2sql. command: resubst

 0.21  Mar 2017   Improved nicenum() and its tests

 0.20  Mar 2017   Subs: a2h cnttbl h2a log10 log2 nicenum rstddev sec_readable
                  throttle timems refa refaa refah refh refha refhh refs
                  eachr globr keysr popr pushr shiftr splicer unshiftr valuesr
                  Commands: 2bz2 2gz 2xz z2z

 0.172 Dec 2015   Subs: curb openstr pwgen sleepms sleepnm srlz tms username

 view all matches for this distribution


Acme-Turing

 view release on metacpan or  search on metacpan

Turing.pm  view on Meta::CPAN


=back

=head1 EXAMPLE

The following example computes the logical OR of two symbols.

  use Acme::Turing;
  $m1 = Acme::Turing->new();
  $m1->init_tape(100, '0', '1');
  $m1->add_spec('START:0', "R:MAYBE");

 view all matches for this distribution


Acme-UNIVERSAL-can-t

 view release on metacpan or  search on metacpan

doap.ttl  view on Meta::CPAN

@prefix dc:    <http://purl.org/dc/terms/> .
@prefix doap:  <http://usefulinc.com/ns/doap#> .
@prefix doap-changeset: <http://ontologi.es/doap-changeset#> .
@prefix doap-deps: <http://ontologi.es/doap-deps#> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .

<http://dev.perl.org/licenses/>

 view all matches for this distribution


Acme-UTOPIA-Utils

 view release on metacpan or  search on metacpan

lib/Acme/UTOPIA/Utils.pm  view on Meta::CPAN

If your Modified Version has been derived from a Modified Version made
by someone other than you, you are nevertheless required to ensure that
your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service
mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge
patent license to make, have made, use, offer to sell, sell, import and
otherwise transfer the Package with respect to any patent claims
licensable by the Copyright Holder that are necessarily infringed by the

 view all matches for this distribution


Acme-Umlautify

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


	Almost concurrently, Nick Wellnhofer <nwellnhof@cpan.org> opened 
		RT #93530 which suggested a UTF solution to the lack of
		umlauts for Latin lower-case y.

	Added a terminology section to the documentation.

1.06  2014/03/03

	Updated POD and README text
	Exporting 'umlautify' by default. Just because.

 view all matches for this distribution


Acme-Unicodify

 view release on metacpan or  search on metacpan

CODE_OF_CONDUCT.md  view on Meta::CPAN

community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
  overall community

Examples of unacceptable behavior include:

CODE_OF_CONDUCT.md  view on Meta::CPAN

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

 view all matches for this distribution


Acme-UseStrict

 view release on metacpan or  search on metacpan

doap.ttl  view on Meta::CPAN

@prefix dc:    <http://purl.org/dc/terms/> .
@prefix doap:  <http://usefulinc.com/ns/doap#> .
@prefix doap-changeset: <http://ontologi.es/doap-changeset#> .
@prefix doap-deps: <http://ontologi.es/doap-deps#> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .

<http://dev.perl.org/licenses/>

 view all matches for this distribution


Acme-VarMess

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        unless ($fh->open("|$ftp -n")) {
            warn "Couldn't open ftp: $!\n";
            chdir $dir; return;
        }

        my @dialog = split(/\n/, << ".");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
.
        foreach (@dialog) { $fh->print("$_\n") }
        $fh->close;
    } }
    else {
        warn "No working 'ftp' program available!\n";
        chdir $dir; return;

 view all matches for this distribution


Acme-Version-Hex

 view release on metacpan or  search on metacpan

inc/MyVersionProvider.pm  view on Meta::CPAN

    my $self = shift;

    my $assign_regex = qr/our\s+\$VERSION\s*=\s*(0x(?:\d*\.)?\d+p[+-]\d+)\s*;/;
    my $eval_regex = qr/\$VERSION\s*=\s*eval\s*\$VERSION;/;
    my ($version, $eval) = $self->zilla->main_module->content=~ m{^$assign_regex\s*($eval_regex)?[^\n]*$}ms;
    $self->log([ 'got version %s', $version ]);

    $version = eval $version if $eval;
    $self->log([ 'evaluated version to %s', $version ]) if $eval;

    return $version;
}

{

 view all matches for this distribution


Acme-VerySign

 view release on metacpan or  search on metacpan

lib/Acme/VerySign.pm  view on Meta::CPAN

=head1 DESCRIPTION

After all is said and done, it's not actually that helpful that perl
returns an error whenever it can't find a subroutine.

This module solves this.  With new I<subfinder> technology whenever
perl can't call a subroutine it automatically returns a scalar that
stringifies to "64.94.110.11" instead!

But wait!  There's more - due to our use of B<Symbol::Approx::Sub>
technology if you treat the scalar as an arrayref you can get the
names of the subroutines we think you meant!  You can even specify
the way we do searching using B<Symbo::Approx::Sub> semantics (i.e.
we support the 'match' and 'xform' parameters.

  use Acme::VerySign xform => "Text::Metaphone";

 view all matches for this distribution


Acme-W

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        unless ($fh->open("|$ftp -n")) {
            warn "Couldn't open ftp: $!\n";
            chdir $dir; return;
        }

        my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
END_FTP
        foreach (@dialog) { $fh->print("$_\n") }
        $fh->close;
    } }
    else {
        warn "No working 'ftp' program available!\n";
        chdir $dir; return;

 view all matches for this distribution


Acme-Wabby

 view release on metacpan or  search on metacpan

ChangeLog  view on Meta::CPAN

version 0.13 (09/21/2005):
	* No changes, accidently uploaded 0.11 as 0.12, bump version so I can
  	  upload this to CPAN.

version 0.12 (09/21/2005):
	* Fix dumb logic in the constructor and expand the test cases to be more
	  complete.

version 0.11 (08/10/2005):
	* Swap to using ref to ensure that a reference is an Acme::Wabby object

 view all matches for this distribution


Acme-Web20-Validator

 view release on metacpan or  search on metacpan

lib/Acme/Web20/Validator.pm  view on Meta::CPAN


L<Module::Pluggable>

=head1 TODO

Improve Catalyst, Rails checking logic.
Add more rules.

=head1 AUTHOR

Naoya Ito, E<lt>naoya@bloghackers.netE<gt>

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

 view all matches for this distribution


Acme-What

 view release on metacpan or  search on metacpan

doap.ttl  view on Meta::CPAN

@prefix dc:    <http://purl.org/dc/terms/> .
@prefix doap:  <http://usefulinc.com/ns/doap#> .
@prefix doap-changeset: <http://ontologi.es/doap-changeset#> .
@prefix doap-deps: <http://ontologi.es/doap-deps#> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .

<http://dev.perl.org/licenses/>

 view all matches for this distribution


Acme-Working-Out-Dependencies-From-META-files-Will-Be-Wrong-At-Some-Point-Like-This-Module-For-Instance

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

  'DateTime::Locale', '0.45',
  'DateTime::TimeZone', '1.34',
  'Devel::Caller', '2.05',
  'Devel::GlobalDestruction', '0.03',
  'Devel::PatchPerl', '0.36',
  'Dist::Zilla::Plugin::ChangelogFromGit', '0.002',
  'Dist::Zilla::Plugin::MakeMaker::Awesome', '0.12',
  'Dist::Zilla::Plugin::ReadmeFromPod', '0.14',
  'Dist::Zilla::Plugin::ReportVersions', '1.110730',
  'Dist::Zilla::Util::Test::KENTNL', '0.01015821',
  'Email::Valid', '0.184',

 view all matches for this distribution


Acme-YAPC-Asia-2012-LTthon-Hakushu

 view release on metacpan or  search on metacpan

xt/podspell.t  view on Meta::CPAN

# computer terms
API
APIs
arrayrefs
arity
Changelog
codebase
committer
committers
compat
cpan

xt/podspell.t  view on Meta::CPAN

invocant's
irc
IRC
isa
JSON
login
namespace
namespaced
namespaces
namespacing
OO

 view all matches for this distribution


Acme-YAPC-Okinawa-Bus

 view release on metacpan or  search on metacpan

lib/Acme/YAPC/Okinawa/ppport.h  view on Meta::CPAN


The name and version of the module you were trying to build.

=item 4.

A full log of the build that failed.

=item 5.

Any other information that you think could be relevant.

lib/Acme/YAPC/Okinawa/ppport.h  view on Meta::CPAN

memEQs|5.009005||p
memEQ|5.004000||p
memNEs|5.009005||p
memNE|5.004000||p
mem_collxfrm|||
mem_log_common|||n
mess_alloc|||
mess_nocontext|||vn
mess_sv||5.013001|
mess||5.006000|v
mfree||5.007002|n

lib/Acme/YAPC/Okinawa/ppport.h  view on Meta::CPAN

newXS||5.006000|
new_collate||5.006000|
new_constant|||
new_ctype||5.006000|
new_he|||
new_logop|||
new_numeric||5.006000|
new_stackinfo||5.005000|
new_version||5.009000|
new_warnings_bitfield|||
next_symbol|||

lib/Acme/YAPC/Okinawa/ppport.h  view on Meta::CPAN

whichsig|||
win32_croak_not_implemented|||n
with_queued_errors|||
wrap_op_checker||5.015008|
write_to_stderr|||
xs_boot_epilog|||
xs_handshake|||vn
xs_version_bootcheck|||
yyerror_pvn|||
yyerror_pv|||
yyerror|||

 view all matches for this distribution


Acme-Your

 view release on metacpan or  search on metacpan

lib/Acme/Your.pm  view on Meta::CPAN


=head1 BUGS

Acme::Your functions by parsing your source code and filtering it
with a source filter.  It is possible to fool the parser with some
pathelogical cases and you should be aware that this module faces all
the standard problems that perl faces when parsing Perl Code.

=head1 VERSION

Acme::Your 0.01 was released on 14th January 2002.

 view all matches for this distribution


Acme-ZydecoTesting-App1

 view release on metacpan or  search on metacpan

doap.ttl  view on Meta::CPAN

@prefix dc:    <http://purl.org/dc/terms/> .
@prefix doap:  <http://usefulinc.com/ns/doap#> .
@prefix doap-changeset: <http://ontologi.es/doap-changeset#> .
@prefix doap-deps: <http://ontologi.es/doap-deps#> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .

<http://dev.perl.org/licenses/>

 view all matches for this distribution


Acme-constant

 view release on metacpan or  search on metacpan

dist.ini  view on Meta::CPAN

[AutoPrereqs]
[PkgVersion]
[ExtraTests]
[PodCoverageTests]
[PodSyntaxTests]
[ChangelogFromGit]

 view all matches for this distribution


Acme-emcA

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        unless ($fh->open("|$ftp -n")) {
            warn "Couldn't open ftp: $!\n";
            chdir $dir; return;
        }

        my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
END_FTP
        foreach (@dialog) { $fh->print("$_\n") }
        $fh->close;
    } }
    else {
        warn "No working 'ftp' program available!\n";
        chdir $dir; return;

 view all matches for this distribution


Acpi-Class

 view release on metacpan or  search on metacpan

t/Acpi/Class.t  view on Meta::CPAN

use warnings;
use 5.010;
use Acpi::Class;
use Test::More tests => 1;

# Check if the value of /sys/class/power_supply/$bat/technology 
# is the same that the one reported by Acpi::Class
my $class   = Acpi::Class->new( class => 'power_supply' );
# my $dir = '/sys/class/power_supply';
my $dir = '/home/mimosinnet/borrem';
my $battery;

t/Acpi/Class.t  view on Meta::CPAN

		$battery = $_ if ($_ =~ /BAT/);
	}
	closedir($device_dir);
	if (defined $battery) 
	{
		my $file = "$dir/$battery/technology";
		if (-f $file ) {
			my $content = do {
				local @ARGV = $file; 
				local $/    = <ARGV>;
			};
			$class->device($battery);
			my $bat_technology = $class->g_values->{'technology'};
			ok ( $bat_technology = $content, "Returned the correct value of $battery technology: $content");
		}
	}
	else
	{
		ok ( 1, "There is no BAT* file in folder $dir");

 view all matches for this distribution


Acpi

 view release on metacpan or  search on metacpan

Battery.pm  view on Meta::CPAN

	my($self) = shift;

	return $self->getBatteryInfo("design capacity");
}

sub getBatteryTechnology{
	my($self) = shift;
	
	return $self->getBatteryInfo("battery technology");
}

sub getBatteryType{
	my($self) = shift;

Battery.pm  view on Meta::CPAN


Return a hash composed by the name of the battery and the design capacity.

=item *

getBatteryTechnology();

Return a hash composed by the name of the battery and the technology.

=item *

getBatteryType();

 view all matches for this distribution


Acrux-DBI

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

Version made by someone other than you, you are nevertheless required
to ensure that your Modified Version complies with the requirements of
this license.

(12)  This license does not grant you the right to use any trademark,
service mark, tradename, or logo of the Copyright Holder.

(13)  This license includes the non-exclusive, worldwide,
free-of-charge patent license to make, have made, use, offer to sell,
sell, import and otherwise transfer the Package with respect to any
patent claims licensable by the Copyright Holder that are necessarily

 view all matches for this distribution


Acrux

 view release on metacpan or  search on metacpan

eg/acrux_log.pl  view on Meta::CPAN

use utf8;

use Acrux::Log;
use IO::Handle;

my $log = Acrux::Log->new(
    handle => IO::Handle->new_from_fd(fileno(STDOUT), "w"),
    level  => 'trace',
    #short  => 1,
    color  => 1,
    #format => sub {
    #    my ($time, $level, @lines) = @_;
    #    return "[$time] [$level] " . join (' ', @lines) . "\n";
    #}
);

$log->trace('Whatever');
$log->debug('You screwed up, but that is ok');
$log->info('You are bad, but you prolly know already');
$log->notice('Normal, but significant, condition...');
$log->warn('Dont do that Dave...');
$log->error('You really screwed up this time');
$log->fatal('Its over...');
$log->crit('Its over...');
$log->alert('Action must be taken immediately');
$log->emerg('System is unusable');

__END__

 view all matches for this distribution


Action-CircuitBreaker

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

                  "allow_dirty" : [
                     "Changes",
                     "dist.ini"
                  ],
                  "allow_dirty_match" : [],
                  "changelog" : "Changes"
               },
               "Dist::Zilla::Role::Git::Repo" : {
                  "git_version" : "2.17.0",
                  "repo_root" : "."
               }

META.json  view on Meta::CPAN

                  "allow_dirty" : [
                     "Changes",
                     "dist.ini"
                  ],
                  "allow_dirty_match" : [],
                  "changelog" : "Changes"
               },
               "Dist::Zilla::Role::Git::Repo" : {
                  "git_version" : "2.17.0",
                  "repo_root" : "."
               },

META.json  view on Meta::CPAN

         {
            "class" : "Dist::Zilla::Plugin::Git::Tag",
            "config" : {
               "Dist::Zilla::Plugin::Git::Tag" : {
                  "branch" : null,
                  "changelog" : "Changes",
                  "signed" : 0,
                  "tag" : "v0.1",
                  "tag_format" : "v%v",
                  "tag_message" : "v%v"
               },

 view all matches for this distribution


Activator

 view release on metacpan or  search on metacpan

bin/activator.pl  view on Meta::CPAN

 Actions
  sync : sync user codebase to target install base

 Options:
  --restart : (re)start the webserver after performing <ACTION>
  --log_level : One of TRACE, DEBUG, INFO, WARN, ERROR, FATAL (see L<Activator::Log>)
  --sync_dir : ignore sync_dir setting from configuration, use this.

 Todo:
  --activator_codebase=<path> : use alternate Activator codebase (for Activator development)

bin/activator.pl  view on Meta::CPAN


if ( catch my $e ) {
    die( "Error while processing command line options: $e" );
}

my $log_level = $config->{log_level} || 'WARN';
if ( $config->{v} || $config->{verbose} ) {
    Activator::Log->level( 'INFO' );
}

$action  = $ARGV[-2];

bin/activator.pl  view on Meta::CPAN


		"mkdir -p $config->{sync_target}",
		"mkdir -p $config->{sync_run_dir}",
		"mkdir -p $config->{sync_lock_dir}",
		"mkdir -p $config->{sync_conf_dir}",
		"mkdir -p $config->{sync_log_dir}",

		"mkdir -p $perl5lib",
		"mkdir -p $document_root",
		"mkdir -p $server_root/logs",

		# all your perl lib are belong to PERL5LIB
		"rsync -a $rsync_flags $project_codebase/lib/* $perl5lib",

		# symlink template files so we don't have to restart server

bin/activator.pl  view on Meta::CPAN

		"ln -sf $project_codebase/root $document_root",

		# symlink apache modules
		"ln -sf /usr/lib/httpd/modules $server_root",

		# symlink apache log files
		"ln -sf $server_root/logs $config->{sync_log_dir}/httpd",

	       );


    if ( $config->{activator_codebase} ) {

bin/activator.pl  view on Meta::CPAN

				      ABSOLUTE => 1,
				      OUTPUT_PATH  => $config->{sync_conf_dir},
				    }
				  );
	    DEBUG( qq(tt processing: $fq_source_file, $config, $out ));
	    $tt->process( $fq_source_file, $config, $out ) || Activator::Log->logdie( $tt->error()."\n");
	}

	# just copy the file
	else {
	    my $rsync_flags = ( $config->{debug} ? '-v' : '' );

bin/activator.pl  view on Meta::CPAN


sub restart {

    my $httpd_conf = $config->{apache2}->{ServerRoot} . '/conf/httpd.conf';
    if ( !-f $httpd_conf ) {
	Activator::Log->logdie( "apache config not found: '$httpd_conf'");
    }

    my $httpd_pid = $config->{apache2}->{PidFile};

    my $cmd;

bin/activator.pl  view on Meta::CPAN

    my $tt = Template->new( { DEBUG => 1,
			      ABSOLUTE => 1,
			      OUTPUT_PATH  => $config->{apache2}->{ServerRoot},
			    }
			  );
    $tt->process( $fq, $config, $out ) || Activator::Log->logdie( $tt->error()."\n");

    # TODO: use some smart hueristics to properly chmod that which
    # should be executable
    #
    #if( $out =~ m@/s?bin/|/init.d/@ ) {

 view all matches for this distribution


ActiveRecord-Simple

 view release on metacpan or  search on metacpan

lib/ActiveRecord/Simple.pm  view on Meta::CPAN

    package Customer;

    use parent 'Model';

    __PACKAGE__->table_name('customer');
    __PACKAGE__->columns(qw/id first_name last_login/);
    __PACKAGE__->primary_key('id');

    __PACKAGE__->has_many(purchases => 'Purchase');


lib/ActiveRecord/Simple.pm  view on Meta::CPAN


    # or (the same):
    my $customer = Customer->objects->get(1);

    print $customer->first_name; # print first name
    $customer->last_login(\'NOW()'); # to use built-in database function just send it as a SCALAR ref
    $customer->save(); # save in the database

    # get all purchases of $customer:
    my @purchases = Purchase->objects->find(customer => $customer)->fetch();

lib/ActiveRecord/Simple.pm  view on Meta::CPAN


=head2 new

Object's constructor.

    my $log = Log->new(message => 'hello', level => 'info');

=head2 connect

Connect to the database, uses DBIx::Connector if installed, if it's not - L<ActiveRecord::Simple::Connect>.
    

lib/ActiveRecord/Simple.pm  view on Meta::CPAN


=head2 table_name

Set table name.

    __PACKAGE__->table_name('log');


=head2 columns

Set columns. Make accessors if make_columns_accessors not 0 (default is 1)

lib/ActiveRecord/Simple.pm  view on Meta::CPAN

=head2 make_columns_accessors

Set to 0 before method 'columns' if you don't want to make accessors to columns:

    __PACKAGE__->make_columns_accessors(0);
    __PACKAGE__->columns('id', 'time'); # now you can't get $log->id and $log->time, only $log->{id} and $log->{time};

=head2 mixins

Create calculated fields

lib/ActiveRecord/Simple.pm  view on Meta::CPAN


=head2 update

Update object using hashref

    $user->update({ last_login => \'NOW()' });


=head2 to_hash

Unbless object, get naked hash

 view all matches for this distribution


ActiveResource

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }

inc/Module/Install/Fetch.pm  view on Meta::CPAN

        unless ($fh->open("|$ftp -n")) {
            warn "Couldn't open ftp: $!\n";
            chdir $dir; return;
        }

        my @dialog = split(/\n/, <<"END_FTP");
open $host
user anonymous anonymous\@example.com
cd $path
binary
get $file $file
quit
END_FTP
        foreach (@dialog) { $fh->print("$_\n") }
        $fh->close;
    } }
    else {
        warn "No working 'ftp' program available!\n";
        chdir $dir; return;

 view all matches for this distribution


( run in 1.055 second using v1.01-cache-2.11-cpan-4849426695f )