GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Proclet::Declare(3) User Contributed Perl Documentation Proclet::Declare(3)

Proclet::Declare - Declare interface to Proclet

  use Proclet::Declare;
  
  color;
  env(
    DEBUG => 1,
    FOO => 1
  );

  service('web', 'plackup -p 5963 app.psgi');
  service('memcached', '/usr/local/bin/memcached', '-p', '11211');
  service('worker', './bin/worker');
  scheduled('tag', '0 12 * * *', sub { MyDailyWork->run });

  worker(
    'worker' => 5
  );
  
  run;

Proclet::Declare supports to use Proclet declare style

color
Sets colored log

  color(); #enable
  color(1); #enable
  color(0); #disable
    

default: disabled

env
Environment values

  worker(
      FOO => 'abc'
      BAR => 'efg'
  );
    
service
Sets the service

  # coderef
  service('tag', sub { MyWorker->run });
  # exec command
  service('tag', '/usr/local/bin/memcached','-vv');
    
scheduled
scheduled job like cron

  # coderef
  scheduled('tag', '0 12 * * *', sub { MyDailyWork->run });
  # exec command
  scheduled('tag', '0 12 * * *', 'my_daily_job','-execute');
    
worker
Number of children to fork

  worker(
      process_name => 1
      process_name => 5
  );
    
run

Masahiro Nagano <kazeburo {at} gmail.com>

Tokuhiro Matsuno

Proclet

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2022-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.