Skip to content

Commit

Permalink
Refactoring / code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Apr 6, 2024
1 parent 296891f commit 2deafba
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions installer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# see - http://www.cmake.org/Wiki/CMake_FAQ#Is_there_an_option_to_produce_more_.27verbose.27_compiling.3F
# SET(CMAKE_VERBOSE_MAKEFILE ON)

cmake_minimum_required(VERSION 3.6)

project("quad-pres")

INCLUDE ("${CMAKE_SOURCE_DIR}/cmake/shlomif_common_bootstrap.cmake")
SHLOMIF_COMMON_SETUP("${private_mod_path}")


SET (PKGDATADIR "${DATADIR}/quad-pres")

SET (PATH_PERL "${PKGDATADIR}/perl5")

add_subdirectory(perl5)
Expand Down
2 changes: 1 addition & 1 deletion installer/perl5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SET (d "${CMAKE_CURRENT_BINARY_DIR}/Shlomif/Quad/Pres/Path.pm")
ADD_CUSTOM_COMMAND(
OUTPUT "${d}"
COMMAND "${PERL_EXECUTABLE}"
ARGS "-E" "use Path::Tiny qw/ path /; use File::Basename qw( dirname) ; use File::Path qw/ mkpath/ ; my $t = path(\"${s}\")->slurp_raw; $t =~ s#\\{QP_MODULES_DIR\\}#${PATH_PERL}#g; $t =~ s#\\{QP_PKG_DATA_DIR\\}#${PKGDATADIR}#g; $t =~ s#/usr/bin/perl#${PATH_PERL}#g; mkpath([dirname(\"${d}\")]); path(\"${d}\")->spew_raw($t);"
ARGS "-E" "use Path::Tiny qw/ path /; my $t = path(\"${s}\")->slurp_raw(); $t =~ s#\\{QP_MODULES_DIR\\}#${PATH_PERL}#g; $t =~ s#\\{QP_PKG_DATA_DIR\\}#${PKGDATADIR}#g; $t =~ s#/usr/bin/perl#${PERL_EXECUTABLE}#g; path(\"${d}\")->touchpath()->spew_raw($t);"
DEPENDS "${s}"
VERBATIM
)
Expand Down
7 changes: 0 additions & 7 deletions installer/perl5/Shlomif/Quad/Pres/Path.pm.pl
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,21 @@ sub _init

sub get_modules_dir
{
my $self = shift;

return $modules_dir;
}

sub get_scripts_dir
{
my $self = shift;

return $scripts_dir;
}

sub get_template_dir
{
my $self = shift;
return $template_dir;
}

sub get_wml_dir
{
my $self = shift;

return $wml_dir;
}

Expand Down
4 changes: 3 additions & 1 deletion installer/perl5/quadp.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/perl -I{QP_MODULES_DIR}
#!/usr/bin/perl

use lib q#{QP_MODULES_DIR}#;

use strict;
use warnings;
Expand Down

0 comments on commit 2deafba

Please sign in to comment.