X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fexport_user.pl;h=2b21466b7ce5d1b9e95a223092c733bbdc0e70f5;hb=1728c7c7a64eaf2852c490629f022c7e70bc46e2;hp=950b72e5386527b12daf5f7d9dad09b77e13ea27;hpb=28adf81497391e90c2c46201f7f3bc23986251fb;p=spider.git diff --git a/perl/export_user.pl b/perl/export_user.pl index 950b72e5..2b21466b 100755 --- a/perl/export_user.pl +++ b/perl/export_user.pl @@ -24,7 +24,7 @@ $userfn = $ARGV[0] if @ARGV; DXUser->init($userfn); @all = DXUser::get_all_calls(); -$t = scalar time; +$t = scalar localtime; print "#!/usr/bin/perl # # The exported userfile for a DXSpider System @@ -40,15 +40,9 @@ package DXUser; for $a (@all) { my $ref = DXUser->get($a); - print "'$a' => bless ( { "; + my $s = $ref->encode(); - my $f; - for $f (sort keys %{$ref}) { - my $val = ${$ref}{$f}; - $val =~ s/'/\\'/og; - print "'$f' => '$val', "; - } - print " }, 'DXUser'),\n"; + print "'$a' => qq{ $s },\n"; $count++; } print ");\n