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


Manual Reference Pages  -  DOCSET::UTIL (3)

.ds Aq ’

NAME

"DocSet::Util" - Commonly used functions

CONTENTS

SYNOPSIS



  use DocSet::Util;

  copy_file($src, $dst);
  write_file($filename, $content);
  create_dir($path);

  read_file($filename, $r_content);
  read_file_paras($filename, $ra_content);

  my $ext = filename_ext($filename);
  my $date = get_date();
  my $timestamp = get_timestamp();
  my $uri = path2uri($os_path);

  require_package($package);
  my $output = proc_tmpl($tmpl_root, $tmpl_file, $mode, $vars);

  banner($string);

  my $sub_ref = build_matchmany_sub($ra_regex);
  dumper($ref);
  confess($string);
  note($string);

  my $exec_path = which(perldoc);



DESCRIPTION

All the functions are exported by default.

    METHODS

META: to be completed (see SYNOPSIS meanwhile)
o copy_file
o write_file
o create_dir
o read_file
o read_file_paras
o filename_ext
o path2uri
o get_date
o get_timestamp
o require_package
o proc_tmpl
o banner
o build_matchmany_sub

Since the patterns are compiled by insertion into m//, make sure that any / are escaped. Be careful with using quotemeta() for this, since you don’t want to espace special regex char, e.g. ^, $, etc.

o which



  my $exec_path = which(perldoc);



a portable function to search for executables on the system.

Accepts a single argument which is the name of the executable to search for. Returns the full path to the executable if found, an empty string otherwise.

Parts of the implementation are borrowed from modperl-2.0/lib/Apache/Build.pm and modified to take into an account Win32’s PATHEXT environment variable or the hardcoded list of known executable extensions for Win9x which doesn’t have this variable.

o dumper
o confess
o cluck
o carp
o note

AUTHORS

Stas Bekman <stas (at) stason.org>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DOCSET::UTIL (3) 2005-09-02

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