BASIS  r3148
Basis.pm
Go to the documentation of this file.
00001 ##############################################################################
00002 # @file  Basis.pm
00003 # @brief BASIS utilities of BASIS package.
00004 #
00005 # @note The Basis.pm module was automatically created by BASIS from the
00006 #       template file Basis.pm.in which is part of BASIS.
00007 #
00008 # This module imports the modules of the BASIS utilities for Perl and exports
00009 # these utility functions as part of its own package scope next to the functions
00010 # defined by this module itself. Hence, it is sufficient to only use this module.
00011 #
00012 # Copyright (c) 2011, 2012 University of Pennsylvania. All rights reserved.<br />
00013 # See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file.
00014 #
00015 # Contact: SBIA Group <sbia-software at uphs.upenn.edu>
00016 #
00017 # @ingroup BasisPerlUtilities
00018 ##############################################################################
00019 
00020 use strict;
00021 use warnings;
00022 
00023 package BASIS::Basis;
00024 {
00025     $BASIS::Basis::VERSION = 0.00_00;
00026 }
00027 
00028 
00029 ## @addtogroup BasisPerlUtilities
00030 # @{
00031 
00032 
00033 # ============================================================================
00034 # exports
00035 # ============================================================================
00036 
00037 use BASIS::Sub::Exporter -setup => {
00038     exports => [
00039         qw(print_contact print_version targetuid istarget exepath exename
00040            exedir tostring qsplit execute)],
00041     groups => {
00042         default    => [qw(print_contact print_version exepath exename exedir execute)],
00043         everything => [qw(print_contact print_version targetuid istarget
00044                           exepath exename exedir tostring qsplit execute)]
00045     }
00046 };
00047 
00048 # ============================================================================
00049 # configuration
00050 # ============================================================================
00051 
00052 ## @brief Project name.
00053 use constant PROJECT   => 'BASIS';
00054 ## @brief Project release.
00055 use constant RELEASE   => 'r3148';
00056 ## @brief Default copyright of executables.
00057 use constant COPYRIGHT => "2011, 2012, 2013 University of Pennsylvania";
00058 ## @brief Default license of executables.
00059 use constant LICENSE   => "See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file.";
00060 ## @brief Default contact to use for help output of executables.
00061 use constant CONTACT   => "SBIA Group <sbia-software at uphs.upenn.edu>";
00062 
00063 # ============================================================================
00064 # custom utilities
00065 # ============================================================================
00066 
00067 my ($_TARGET_PREFIX, %_EXECUTABLE_TARGETS, $_TARGETS_BASE);
00068 
00069 BEGIN {
00070     use File::Basename qw(dirname);
00071 
00072     $_TARGET_PREFIX = 'basis';
00073 
00074     %_EXECUTABLE_TARGETS = (
00075         'basis.basisproject'      => '../../../bin/basisproject',
00076         'basis.doxyfilter'        => '../../doxyfilter',
00077         'basis.doxyfilter-perl'   => '../../doxyfilter-perl',
00078         'basis.testdriver'        => '../../testdriver',
00079         'basis.basistest-svn'     => '../../basistest-svn',
00080         'basis.basistest-slave'   => '../../basistest-slave',
00081         'basis.basistest-master'  => '../../basistest-master',
00082         'basis.basistest-cron'    => '../../basistest-cron',
00083         'basis.basistest'         => '../../../bin/basistest',
00084         'basis.dummy_command'     => '../../../bin/dummy_command',
00085         'basis.test_matlabtools'  => '',
00086         'basis.test_basisproject' => '',
00087         'basis.test_os'           => '../../../bin/test_os',
00088         'basis.test_path'         => '../../../bin/test_path',
00089         'basis.test_subprocess'   => '../../../bin/test_subprocess',
00090         'basis.test_core'         => '',
00091         'basis.test_shutilities'  => '',
00092         'basis.test_shtap'        => '',
00093         'basis.parseargs'         => '../../../bin/parseargs',
00094         'basis.test_utilities'    => ''
00095     );
00096 
00097     $_TARGETS_BASE = dirname(__FILE__);
00098 }
00099 
00100 use BASIS::Utilities qw(tostring qsplit),
00101         print_contact => { contact => CONTACT },
00102         print_version => { project => PROJECT, version => RELEASE, copyright => COPYRIGHT, license => LICENSE },
00103         targetuid     => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE },
00104         istarget      => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE },
00105         exepath       => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE },
00106         exename       => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE },
00107         exedir        => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE },
00108         execute       => { prefix => $_TARGET_PREFIX, targets => \%_EXECUTABLE_TARGETS, base => $_TARGETS_BASE };
00109 
00110 
00111 ## @}
00112 # end of Doxygen group
00113 
00114 
00115 1; # indicate success of module loading