Changeset 556 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/Base.pm


Ignore:
Timestamp:
Sep 23, 2008, 12:41:14 PM (16 years ago)
Author:
Bruno Cornec
Message:
  • Prepare a web delivery function
  • Creates a pbinit script for website for mondorescue
  • Adds a pb_set_content function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Base.pm

    r512 r556  
    3838
    3939our @ISA = qw(Exporter);
    40 our @EXPORT = qw(pb_mkdir_p pb_system pb_rm_rf pb_get_date pb_log pb_log_init pb_get_uri pb_get_content pb_display_file pb_syntax_init pb_syntax pb_temp_init $pbdebug $pbLOG $pbdisplaytype $pblocale);
     40our @EXPORT = qw(pb_mkdir_p pb_system pb_rm_rf pb_get_date pb_log pb_log_init pb_get_uri pb_get_content pb_set_content pb_display_file pb_syntax_init pb_syntax pb_temp_init $pbdebug $pbLOG $pbdisplaytype $pblocale);
    4141
    4242=pod
     
    300300}
    301301
     302
     303=item B<pb_set_content>
     304
     305This function put the content of a file into the file passed in parameter.
     306
     307=cut
     308
     309sub pb_set_content {
     310
     311my $file=shift;
     312my $content=shift;
     313
     314my $bkp = $/;
     315undef $/;
     316open(R,"> $file") || die "Unable to write to $file: $!";
     317print R "$content";
     318close(R);
     319$/ = $bkp;
     320}
     321
    302322=item B<pb_syntax_init>
    303323
Note: See TracChangeset for help on using the changeset viewer.