Commit 50804ee7 authored by Xavier Guimard's avatar Xavier Guimard

Little things

git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/trunk@4094 1dbb9719-a921-0410-b57f-c3a383c2c641
parent 91d35f63
......@@ -182,7 +182,7 @@ json: $(MANAGERJSONDST)
$(MANAGERJSONDST): $(MANAGERJSONSRC)
cd $(SRCMANAGERDIR) && ./scripts/jsongenerator.pl && cd -
configure: common_conf handler_conf portal_conf manager_conf
configure: json common_conf handler_conf portal_conf manager_conf
common_conf: ${SRCCOMMONDIR}/Makefile
......
# This file is generated by ./scripts/jsongenerator.pl. Don't modify it by hand
# This file is generated by Lemonldap::NG::Manager::Build. Don't modify it by hand
package Lemonldap::NG::Common::Conf::DefaultValues;
our $VERSION = '1.9.0';
......
# This file is generated by ./scripts/jsongenerator.pl. Don't modify it by hand
# This file is generated by Lemonldap::NG::Manager::Build. Don't modify it by hand
package Lemonldap::NG::Manager::Attributes;
our $VERSION = '1.9.0';
......
......@@ -20,6 +20,7 @@ has defaultValuesFile => ( isa => 'Str', is => 'ro', required => 1 );
my @managerAttrKeys = qw(keyTest type test msgFail default);
my $format = 'Creating %-69s: ';
my $reIgnoreKeys = qr/^$/;
my $module = __PACKAGE__;
my @angularScopeVars;
my @cnodesKeys;
......@@ -53,7 +54,7 @@ $Data::Dumper::Sortkeys = sub {
sub run {
my $self = shift;
$self = __PACKAGE__->new(@_) unless ref $self;
$self = $module->new(@_) unless ref $self;
# 1. confTree.js
printf STDERR $format, $self->confTreeFile;
......@@ -136,7 +137,7 @@ sub run {
. join( 'Keys $', 'simpleHash', 'specialNode', sort keys %cnodesRe )
. 'Keys $specialNodeHash @sessionTypes';
print F <<EOF;
# This file is generated by $0. Don't modify it by hand
# This file is generated by $module. Don't modify it by hand
package Lemonldap::NG::Manager::Constants;
use strict;
......@@ -185,7 +186,7 @@ EOF
};
my $defaultAttr = Dumper($defaultValues);
$defaultAttr =~ s/^\$VAR1\s*=/sub defaultValues {\n return/;
$defaultAttr = "# This file is generated by $0. Don't modify it by hand
$defaultAttr = "# This file is generated by $module. Don't modify it by hand
package Lemonldap::NG::Common::Conf::DefaultValues;
our \$VERSION = '$Lemonldap::NG::Manager::Build::Attributes::VERSION';
......@@ -227,7 +228,7 @@ $defaultAttr}
my $managerTypes =
Dumper( Lemonldap::NG::Manager::Build::Attributes::types() );
$managerTypes =~ s/^\$VAR1\s*=/sub types {\n return/;
$managerAttr = "# This file is generated by $0. Don't modify it by hand
$managerAttr = "# This file is generated by $module. Don't modify it by hand
package Lemonldap::NG::Manager::Attributes;
our \$VERSION = '$Lemonldap::NG::Manager::Build::Attributes::VERSION';
......@@ -354,21 +355,8 @@ sub scanTree {
unless ( $prefix or $leaf =~ $reIgnoreKeys ) {
push @simpleHashKeys, $leaf;
}
#if ( $opts{f} ) {
# my $js = getData( $prefix . $leaf );
#}
}
else {
#if ( $opts{f} ) {
# my $file = $jleaf->{get} // $jleaf->{title};
# my $js = getData($file);
# $jleaf->{get} = $file = $file . ".json";
# open F, ">app/confs/$opts{f}/$file"
# or die $!;
# print F $js;
# close F;
#}
if ( $prefix and !$jleaf->{get} ) {
$jleaf->{get} = $prefix . $jleaf->{title};
}
......@@ -378,20 +366,5 @@ sub scanTree {
}
}
__END__
sub getData {
die $opts{f} unless $opts{f} =~ /^\d+$/;
my $k = shift;
my $q = "/confs/$opts{f}/$k";
return $run->(
{
HTTP_ACCEPT => 'application/json',
PATH_INFO => $q,
QUERY_STRING => '',
REQUEST_URI => $q,
REQUEST_METHOD => 'GET',
}
)->[2]->[0];
}
1;
__END__
# This file is generated by ./scripts/jsongenerator.pl. Don't modify it by hand
# This file is generated by Lemonldap::NG::Manager::Build. Don't modify it by hand
package Lemonldap::NG::Manager::Constants;
use strict;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment