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  -  CONNECTOR::BUILTIN::FILE::PATH (3)

.ds Aq ’

Name

Connector::Builtin::File::Path

CONTENTS

Description

Highly configurable file writter/reader.

Parameters

LOCATION The base directory where the files are located. This parameter is mandatory.
file Pattern for Template Toolkit to build the filename. The path components are available in the key ARGS. In set mode the unfiltered data is available in key DATA.
content Pattern for Template Toolkit to build the content. The data is passed as is. If data is a scalar, it is wrapped into a hash using DATA as key.
ifexists
o append: opens the file for appending write.
o fail: call die
o silent: fail silently.
o replace: replace the file with the new content.

Supported Methods

    set

Write data to a file.



    $conn->set(filename, { NAME => Oliver, ROLE => Administrator });



See the file parameter how to control the filename. By default, files are silently overwritten if they exist. See the ifexists parameter for an alternative behaviour.

    get

Fetch data from a file. See the file parameter how to control the filename.



    my $data = $conn->set(filename);



Example



    my $conn = Connector::Builtin::File::Path->new({
       LOCATION: /var/data/
       file: [% ARGS.0 %].txt
       content: Hello [% NAME %]
    });

    $conn->set(test, { NAME => Oliver });



Results in a file /var/data/test.txt with the content Hello Oliver.

POD ERRORS

Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 217: You forgot a ’=back’ before ’=head1’
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CONNECTOR::BUILTIN::FILE::PATH (3) 2014-08-27

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