Re: [Catalyst] size of the uploaded file

2009-01-04 Thread Robin Berjon

On Jan 4, 2009, at 17:01 , Octavian Rasnita wrote:
And unfortunately other solutions like a Flash uploader are not  
accessible for screen readers, but I have also read that it is  
recommended to upload files smaller than 100 MB with the Flash  
uploader...


I forgot to say: you might want to take a look at http:// 
swfupload.org/ for instance.


--
Robin Berjon - http://berjon.com/
   Feel like hiring me? Go to http://robineko.com/






___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] size of the uploaded file

2009-01-04 Thread Robin Berjon

On Jan 4, 2009, at 17:01 , Octavian Rasnita wrote:
And unfortunately other solutions like a Flash uploader are not  
accessible for screen readers, but I have also read that it is  
recommended to upload files smaller than 100 MB with the Flash  
uploader...


You can make Flash uploaders accessible, at least in the case of  
screen readers that plug into a sighted browser (which I'm guessing is  
the case you're thinking of). Basically you have a piece of Javascript  
that calls into a non-visual SWF, you can keep your page regular,  
pretty much as if you were relying on a browser built-in function. You  
might even be able to use an ARIA role for it, though I'm not entirely  
sure which one.


--
Robin Berjon - http://berjon.com/
Feel like hiring me? Go to http://robineko.com/






___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] create search engine friendly uri from string

2008-12-16 Thread Robin Berjon
On Dec 16, 2008, at 12:20 ,  > wrote:
On Tue, 16 Dec 2008 11:51:28 +0100, Robin Berjon   
wrote:
Before putting that into a module though you might want to think  
about
what should happen to characters outside the [a-z0-9] range as \W  
will

match differently based on locale. I'm not sure what the recommended
behaviour is for such cases.


That's what I'm thinking about right now. I couldn't find a  
reference which

says that \W matches differently based on locale.


From perlre

   A "\w" matches a single alphanumeric character (an alphabetic
   character, or a decimal digit) or "_", not a whole word.  Use  
"\w+" to
   match a string of Perl-identifier characters (which isn't the  
same as
   matching an English word).  If "use locale" is in effect, the  
list of
   alphabetic characters generated by "\w" is taken from the  
current

   locale.


Ptyhon can convert an utf8 string to an ascii string and replaces
characters like "ä" with the most equivalent character "a". Is there  
such

a thing for perl?


There's a host of modules on CPAN that do things like that, but I  
don't know if one is accepted as the better way to go. The problem is  
that if you want to cover all your bases it can become a rather  
extensive problem. For instance you might want to convert "é" to "e",  
but do you want to map "北京" to "beijing"?


The simple solution is probably to have one option that encodes to IRI  
friendly, and another to URI friendly, and let people who want  
something more complicated roll up their own. See http://annevankesteren.nl/2004/08/uri-design 
 for some thoughts related to this, or http://www.w3.org/International/iri-edit/draft-duerst-iri-bis.html 
.


But that doesn't address the locale issue. For that be sure to toss in  
a no locale (which is lexical) or to define your own character classes  
instead of \w, \s, and friends.


--
Robin Berjon - http://berjon.com/
Feel like hiring me? Go to http://robineko.com/






___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] create search engine friendly uri from string

2008-12-16 Thread Robin Berjon

On Dec 15, 2008, at 21:53 , Johannes Plunien wrote:

My not very elegant, but working solution:

my $str = "  Beta Launch Invites: Kwyno Brings The Web Into Your IM  
And (Soon) SMS Inboxes  ";

$str =~ s/^\s+|\s+$//g;
$str =~ s/\W/ /g;
$str =~ s/\s{1,}/ /g;
$str =~ s/\s/-/g;
$str = lc($str);

print "$str\n";


A wee bit shorter:

my $str = "  Beta Launch Invites: Kwyno Brings The Web Into Your IM  
And (Soon) SMS Inboxes  ";

$str =~ s/^\s+|\s+$//g;
$str =~ s/\W+/-/g;
$str = lc($str);

print "$str\n";

Before putting that into a module though you might want to think about  
what should happen to characters outside the [a-z0-9] range as \W will  
match differently based on locale. I'm not sure what the recommended  
behaviour is for such cases.



--
Robin Berjon - http://berjon.com/
Feel like hiring me? Go to http://robineko.com/






___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] vote for Catalyst in Enterprise Open Source Directory

2008-12-11 Thread Robin Berjon

On Dec 11, 2008, at 18:20 , Rodrigo wrote:
Perl 5.10 is also listed, so vote to make a great-looking language  
look even better.


http://www.eosdirectory.com/project/61/Perl.html


And if you have spare cycles, try to figure out which scoring systems  
gets PHP 4 stars out of 4 but Perl only 3, and Cocoon only 1. I'm not  
against pushing Catalyst everywhere just in case it helps (and I did  
vote) but that site seems to be powered by crystal meth more than  
anything else. I pity the company in which someone in charges gives it  
any credence.


--
Robin Berjon - http://berjon.com/
Feel like hiring me? Go to http://robineko.com/






___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] BerkeleyDB session storage

2008-12-11 Thread Robin Berjon

On Dec 11, 2008, at 11:52 , Jonathan Rockway wrote:
Anyway, I have written Catalyst::Plugin::Session::Store::BerkeleyDB  
as a
drop-in replacement.  It is based on BerkeleyDB, and will never lose  
any
sessions (unless your disk fails).  It is safe to share between  
multiple
processes, and even multiple machines with the right environment  
setup.
It can also integrate with your existing BDB database, which is good  
for

KiokuDB users.  (And by default, it requires no configuration.)


In related news I have a Session::Store::KiokuDB and an  
Authentication::Store::KiokuDB hitting CPAN later today when I get a  
little time to finish wrapping them up.


--
Robin Berjon - http://berjon.com/
Feel like hiring me? Go to http://robineko.com/






___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Extra characters inserted into PDF output

2008-12-02 Thread Robin Berjon

On Dec 2, 2008, at 17:02 , Dr. Jennifer Nussbaum wrote:
My PDF files are being uploaded and saved in the database apparently  
correctly. Then what seems to be happening is that somewhere in the  
binary stream of PDF, there is a (random) sequence of "somewhere later there is a ">". And something is inserting a "--"  
before the ">".


My debugging statements show that Catalyst is outputting the correct  
size of the file, which suggests that the insertion is happening  
elsewhere.


The one thing you're not saying is under what Catalyst is running when  
it's producing that. Are you running FastCGI? Mod_perl? Stand-alone  
development server?


If it happens in all of those then the bug is probably in your code  
(though after your debugging statements). If the insertion is indeed  
happening outside that pretty much just leaves the Web server, or  
perhaps a proxy. Wild stab in the dark: do you happen to have SSI  
turned on?


--
Robin Berjon - http://berjon.com/
Feel like hiring me? Go to http://robineko.com/






___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Xml data to html

2008-09-16 Thread Robin Berjon

On Sep 15, 2008, at 21:53 , Pedro Guevara wrote:
Well I thought to make a script but It's going to take me a lot of  
time.
Because is a complex tree of data, so I supossed that some module of  
Catalyst would do it for me.

It's like


  
  


  
  



And it retrieves: like html

Libraries

   
Library : Wolf
Books:  The King,The Queen
   

Library : Fox
 Books:  The Castle,The Dragon




Like everyone else I can only say that this has nothing to do with  
Catalyst. But what the heck. It's a trivial conversion, so simple that  
you don't even need XSLT (though you can still use it, I probably  
would). Old school approach:


use XML::LibXML;
my $doc = XML::LibXML->new->parse_file('libraries.xml');
print "\n";
for my $lib ($doc->getElementsByTagNameNS(undef, 'library')) {
print "  \nLibrary:" .
  $lib->getAttributeNS(undef, 'name') .
  "\nBooks:" .
  join(', ', map { $_->getAttributeNS(undef, 'name') } $lib- 
>getElementsByTagNameNS(undef, 'book')) .

      "\n  \n";
}
print "\n";

I haven't tested the above, but if it doesn't work something a lot  
like it will.


--
Robin Berjon - http://berjon.com/
Feel like hiring me? Go to http://robineko.com/






___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] XPath, DOM problem

2008-07-08 Thread Robin Berjon

On Jul 8, 2008, at 12:23 , Herr Verdieck Götz wrote:
But I think it is curious that XML.Simple finds the path and XPath/ 
DOM not.


If you look at the code for XML::Simple you'll see that it has a fair  
bit of wiring to locate XML files passed as relative paths. I haven't  
looked into the details but that's probably why it's finding it.


--
Robin Berjon - http://berjon.com/




___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Re: Catalyst site design drafts feedback thread

2008-06-12 Thread Robin Berjon

On Jun 12, 2008, at  10:40, Simon Wilcox wrote:

Kieren Diment wrote:
Subjectively speaking, I think that all the sites you mention  
above are horribly ugly with the exception of the rubyonrails one  
which is quite nice.   Mainly the other sites lose me in a  
technicolour yawn (http://www.urbandictionary.com/define.php? 
term=technicolor+yawn) of blocky colour.


I rather liked the cakephp site. Strong bold colours give an  
impression that it's a fun product.


But I think that it depends on who you are appealing to. In the  
case of the PHP sites you're largely looking to attract designer/ 
developers so it is important that you "speak" their visual language.


In the perl world you find that developers are far less concerned  
with design aesthetics. cf. masonhq.com, maypole.perl.org and all  
the perl community sites in general.


I think there's more to it than that: there's attracting (and  
reassuring) decision makers too. As a developer I don't really care  
if the site looks good or not, I'll just look at the documentation,  
at the features, and to see if there are active mailing list and IRC  
channel. But to someone not necessarily extremely technically fluent  
(but not PHB stupid either) who has to pick between several options  
it matters. Not that the decision might be based solely on that, but  
once you've been through your checklist (major language, Web  
libraries, AJAX, MVC, reusable components...) given the cost of an in- 
depth analysis looks matter. You might not pick the winning system  
based on looks, but if you intend to give several a spin you'll  
probably want to try the one with the "freshest" site a go first. And  
if that one happens to work, well what's the point in checking the  
others?


Based on that approach, today, I'd go CakePHP.

As a general rule, the Perl community has been inordinately good over  
the past decade at hurting itself by not wanting to appeal to people  
outside those already in the gang. It's a shame.


I don't think there's anything significantly wrong with the design  
of the current site. The IA & content needs work but the design is  
perfectly servicable.


Agreed, I vote to keep it :) Some tweaks I'd suggest:

 - the "Development" box isn't so much about development as it is a  
manifesto about KISS and DRY and TIMTOWTDI. This could be made  
clearer by calling it "Manifesto" and giving nice little headings or  
some boldness for the leading ideas. Perhaps also making it more  
prominent.
 - by a similar token, "Deployment" isn't exactly what I'd call  
enticing. Perhaps just calling it "Universal Deployment" and moving  
the OS logos above the fold would be enough.
 - the quotes on the side could be made sexier with minimal effort,  
just a touch of design and perhaps some rotating. Proof-reading  
wouldn't hurt ("totaly rad").
 - the top links are wrong in two ways: they're not labelled right,  
and they don't stay when you move between pages. "Documentation"  
should stay in-site rather than link to CPAN. "Developer" is a bit  
useless by pointing to the SVN log (that's hardly a top-level link is  
it?) and "Community" is really about development; I'd call it  
"Development" or "Development Community", and if possible get that  
part of the site in the same template. "Download" should be a big  
prominent button, and it also shouldn't lead to CPAN: rather it  
should go to a page that explains how to obtain Catalyst, either as a  
direct download or through the CPAN shell. "Planet" is fine except  
that it doesn't use the same template as the index page (some of the  
details change) which feels unprofessional. The Advent Calendar is  
great, but it should also be in-style with the rest (and it should be  
easy to use it as a cookbook rather than as a day-by-day thing).


Personally, I'd do that first, then we can look at tweaking the  
design. Since presumably it would cause the site to be templated  
properly, designers could even get their designs tested in-situ,  
which is a lot easier than through screenshots.


--
Robin Berjon - http://berjon.com/

Fry: Things are different this time. Before she was demanding and
  possessive, but now she just wants me to do stuff and stay with her
  all the time.
-- Futurama



___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/