Changeset 1063 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/Base.pm
- Timestamp:
- Jun 25, 2010, 5:22:22 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Base.pm
r1060 r1063 87 87 # Manages content of a file 88 88 # 89 pb_display_file("/etc/passwd" );89 pb_display_file("/etc/passwd",\*STDERR); 90 90 my $cnt = pb_get_content("/etc/passwd"); 91 91 … … 267 267 268 268 This function print the content of the file passed in parameter. 269 If a second parameter is given, this is the descriptor of the logfile to write to in addtion to STDOUT. 269 270 270 271 This is a cat equivalent function. … … 275 276 276 277 my $file=shift; 278 my $desc=shift || undef; 277 279 278 280 return if (not -f $file); 279 printf "%s\n",pb_get_content($file); 281 my $cnt = pb_get_content($file); 282 print "$cnt\n"; 283 print $desc "$cnt\n" if (defined $desc); 280 284 } 281 285
Note:
See TracChangeset
for help on using the changeset viewer.