Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>

WEEK'S BEST

  • BackTrack 5 R1
  • Wine 1.2.3 / 1.4 RC4
  • Mozilla Firefox 10...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.2.7
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.1
  • Home > Linux > Programming > Perl Modules

    Setup::File 0.11

    Download button

    No screenshots available
    Downloads: 35  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Steven Haryanto | More programs
    Perl Artistic License / FREE
    January 27th, 2012, 03:26 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Setup::File description

    Setup file (existence, mode, permission, content)

    Setup::File is a Perl module that provides one function: setup_file.

    This module is part of the Setup modules family.

    This module uses Log::Any logging framework.

    This module's functions have Sub::Spec specs.

    SYNOPSIS

     use Setup::File 'setup_file';

     # simple usage (doesn't save undo data)
     my $res = setup_file path => '/etc/rc.local',
     should_exist => 1,
     gen_content_code => sub { \("#!/bin/sh\n") },
     owner => 'root', group => 0,
     mode => '+x';
     die unless $res->[0] == 200 || $res->[0] == 304;

     # perform setup and save undo data (undo data should be serializable)
     $res = setup_file ..., -undo_action => 'do';
     die unless $res->[0] == 200 || $res->[0] == 304;
     my $undo_data = $res->[3]{undo_data};

     # perform undo
     $res = setup_file ..., -undo_action => "undo", -undo_data=>$undo_data;
     die unless $res->[0] == 200 || $res->[0] == 304;



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Perl setup_file | Perl module | Perl | setup_file | class



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM