Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
best-practical
rt-extension-ldapimport
Commits
787bc18e
Commit
787bc18e
authored
Oct 22, 2012
by
Thomas Sibley
Browse files
Update M::I
parent
22b0995c
Changes
1
Hide whitespace changes
Inline
Side-by-side
inc/Module/Install/RTx.pm
View file @
787bc18e
...
...
@@ -8,7 +8,7 @@ no warnings 'once';
use
Module::Install::
Base
;
use
base
'
Module::Install::Base
';
our
$VERSION
=
'
0.29
';
our
$VERSION
=
'
0.29
_02
';
use
FindBin
;
use
File::
Glob
();
...
...
@@ -129,18 +129,7 @@ install ::
my %has_etc;
if ( File::Glob::bsd_glob(
"
$
FindBin::
Bin
/etc/sc
hema
.*
"
) ) {
# got schema, load factory module
$has_etc
{schema}++;
$self
->load('RTxFactory');
$self
->postamble(<<
"
.
"
);
factory ::
\t\$
(NOECHO)
\$
(PERL) -Ilib -I
"
$local_lib_path
"
-I
"
$lib_path
"
-Minc::Module::Install -e
"
RTxFactory
(
qw($RTx $name)
)"
dropdb ::
\t\$
(NOECHO)
\$
(PERL) -Ilib -I
"
$local_lib_path
"
-I
"
$lib_path
"
-Minc::Module::Install -e
"
RTxFactory
(
qw($RTx $name drop)
)"
.
}
if ( File::Glob::bsd_glob(
"
$
FindBin::
Bin
/etc/acl
.*
"
) ) {
$has_etc
{acl}++;
...
...
@@ -164,28 +153,19 @@ dropdb ::
print
"
For
first
-
time
installation
,
type
'
make initdb
'
.\
n
"
;
my
$initdb
= '';
$initdb
.= <<
"
.
"
if
$has_etc
{schema};
\t\$
(NOECHO)
\$
(PERL) -Ilib -I
"
$local_lib_path
"
-I
"
$lib_path
"
-Minc::Module::Install -e
"
RTxInitDB
(
qw(schema)
)"
\t\$
(NOECHO)
\$
(PERL) -Ilib -I
"
$local_lib_path
"
-I
"
$lib_path
"
-Minc::Module::Install -e
"
RTxInitDB
(
qw(schema
\$(NAME) \$(VERSION)
)
)"
.
$initdb
.= <<
"
.
"
if
$has_etc
{acl};
\t\$
(NOECHO)
\$
(PERL) -Ilib -I
"
$local_lib_path
"
-I
"
$lib_path
"
-Minc::Module::Install -e
"
RTxInitDB
(
qw(acl)
)"
\t\$
(NOECHO)
\$
(PERL) -Ilib -I
"
$local_lib_path
"
-I
"
$lib_path
"
-Minc::Module::Install -e
"
RTxInitDB
(
qw(acl
\$(NAME) \$(VERSION)
)
)"
.
$initdb
.= <<
"
.
"
if
$has_etc
{initialdata};
\t\$
(NOECHO)
\$
(PERL) -Ilib -I
"
$local_lib_path
"
-I
"
$lib_path
"
-Minc::Module::Install -e
"
RTxInitDB
(
qw(insert)
)"
\t\$
(NOECHO)
\$
(PERL) -Ilib -I
"
$local_lib_path
"
-I
"
$lib_path
"
-Minc::Module::Install -e
"
RTxInitDB
(
qw(insert
\$(NAME) \$(VERSION)
)
)"
.
$self
->postamble(
"
initdb
::\
n$initdb
\
n
"
);
$self
->postamble(
"
initialize
-
database
::\
n$initdb
\
n
"
);
}
}
sub RTxInit {
unshift
@INC
, substr( delete(
$INC
{'RT.pm'} ), 0, -5 ) if
$INC
{'RT.pm'};
require RT;
RT::LoadConfig();
RT::ConnectToDatabase();
die
"
Cannot
load
RT
"
unless
$RT
::Handle and
$RT
::DatabaseType;
}
# stolen from RT::Handle so we work on 3.6 (cmp_versions came in with 3.8)
{ my %word = (
a => -4,
...
...
@@ -228,4 +208,4 @@ sub requires_rt {
__END__
#line 3
4
8
#line 3
2
8
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment