Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Alias (5735)

Alias
  (email not shown publicly)
http://ali.as/

Journal of Alias (5735)

Friday September 28, 2007
03:04 AM

TinyAuth Beta 2 - Now actually usable

[ #34558 ]

After another series of incremental releases, I've now largely moved up from testing "TinyAuth' (my yet-to-be-properly-named ultra-minimalist SVN repository manager) only in test scripts to testing it on a real server with a real .htpasswd file using a real browser (although not for a real service yet).

If you are interested, feel free to point a browser, indeed ANYTHING that calls itself a "browser", at http://svn.ali.as/cgi-bin/tinyauth.

You can use the username "adamk@cpan.org" and password "foo" to login and add an account for yourself (and promote yourself to admin if you want).

I've also added some basic installation instructions for anyone that is interested in tinkering with an installation of their own.

Please note there's still more polishing, bug fixing and general getting-ready to do before the final release, so expect a few potential nigglies.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Did someone change your password? I can't login :)

    • I can confirm this. I tried to login now and was not able to, either.

    • I've reset the password to "foo", I must have changed it during testing.

      Go nuts.
      • Thanks. I was able to login to TinyAuth, create an account, receive the password by mail and promote myself to admin.

        However, I cannot seem to be able to commit anything to the repository:

        shlomi:~/progs/perl/cpan/Archive-Zip/trunk/Archive-Zip$ svn commit -F svn-commit.tmp
        Authentication realm: <http://svn.ali.as:80> The Open Repository
        Password for 'shlomi':
        Authentication realm: <http://svn.ali.as:80> The Open Repository
        Username: shlomif@cpan.org
        Password for 'shlomif@cpan.org':
        Authenticati

        • That is correct.

          As I mentioned, the application is just for testing purposes atm, it isn't controlling the actual repository yet.

          I'll do that some time down the track, just before release.
  • Your &run method if/elsif/else chain is very difficult to read. Switching to a dispatch table makes it much easier to understand.

    my %method_for = (
        o => 'action_logout',
        f => 'view_forgot',
        r => 'action_forgot',
        c => 'view_change',
        p => 'action_change',
        n => 'view_new',
        a => 'action_new',
        l => 'view_list',
        m => 'view_promote',
        b => 'action_pro

    • I'm not sure I'd call that simpler, possibly more elegant though
      • It's easier to see which action maps to which method and makes it less likely to have bugs in the future as adding a new action is trivial. You just add a new entry to the hash and don't have to worry about the code.

        • I find that both elegant and easier to read. I haven' used dispatch tables much but time to go read about them again. : )
          • The "but time to go read about them again" is the main reason I don't want to use them... I'm trying to keep stuff as utterly boring and minimalist as possible.

            But you are right the if/else chain is VISUALLY hard to read, so I might do something to fix that instead of moving to dispatch table.
            • Technically that’s not even a dispatch table (since it does not map from strings to coderefs). I don’t know why people “need to read about them” either – I came up with the concept independently long before I knew it had a name. Seems obvious to me, and I don’t think I am a genius… what do I know.

              And actually, I don’t know why Ovid rewrote the code the way he did, because it’s easy to make it even simpler:

              sub run {
                  my $self = shift;