PBS::SubpbsResult

PBS::SubpbsResult module contains support for hierarchical projects.
Download

PBS::SubpbsResult Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Khemir Nadim
  • Publisher web site:
  • http://search.cpan.org/~nkh/List-Tuples-0.03/lib/List/Tuples.pm

PBS::SubpbsResult Tags


PBS::SubpbsResult Description

PBS::SubpbsResult module contains support for hierarchical projects. PBS::SubpbsResult module contains support for hierarchical projects.SYNOPSIS use PBS::SubpbsResult ; my $subpbs_result = new PBS::SubpbsResult($file_name) ; my @search_paths = @{ $subpbs_result->GetLibrarySearchPaths()} ;Pbs strives to let you build hierarchical projects, this module simplifies the task of returning sub module information to the module parent. This module is amainly used in Builders.This module lets you create files which hold the information. Below are two examples.linker informationSay you have module A which has a link dependency on module B. Module B needs to be linked with and extra library. A and B are build in different project (a subpbs for B exists).When linking your project, you need to know at the top level what B needs to be linked with. To avoid putting knowledge of B's dependencies in the build of A, we would like the link information to be returned in a generic way to A.Module B build result, when invoked from A's build is a '.subpbs_result' file. # make A depend on B's build result AddRule 'module B', , &Build_A ; # Build B in a subpbs AddSubpbRule('B.subpbs_result', 'somepbs_file.pl') sub Build_A { use PBS::SubpbsResult ; ... my @objects_to_link ; my @libs ; my @other_specific_information ; my $very_special_information ; for my $dependency (@dependencies) { if($dependency =~ /.subpbs_result/) { my $subpbs_result = new PBS::SubpbsResult($dependency) ; push @objects_to_link, GetObjects($subpbs_result) ; push @libs, GetLibraries($subpbs_result) ; push @other_specific_information = GetOtherSpecificInformation($subpbs_result) ; $very_special_information = GetVerySpecialInformation($subpbs_result) ; } } ... } # in somepbs_file.pl my @libraries = ('some_lib', 'some_other_lib') ; my @other_specific_information = ('specific1', 'specific2') ; my $very_special_information = 1 ; AddRule 'B.subpbs_result', , &BuildSubpbsResult ; sub BuildSubpbsResult { ... use PBS::SubpbsResult ; my $subpbs_result = new PBS::SubpbsResult() ; for my $dependency (@dependencies) { if($dependency =~ /.subpbs_result$/) { $subpbs_result->Append($dependency) ; } else { $subpbs_result->AddObjects({NAME =>$dependency, MD5 => $md5}) ; } } $subpbs_result->AddLibraries(@libraries) ; $subpbs_result->AddWithMd5('other_specific_information', @other_specific_information) ; $subpbs_result->Add('very_special_information', $very_special_information) ; $subpbs_result->Write($dependent) ; } Requirements: · Perl


PBS::SubpbsResult Related Software