Hi,
Thanks a lot for your replies. Can someone please explain me what this line
does:
% my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime((stat($r->filename))[9]);
Thanks,
Charmie
On Fri, Sep 24, 2010 at 4:28 AM, Jérôme Etévé <jerome.et...@gmail.com>wrote:
> Or implement the missing method in your startup.pl or wherever it
> makes sense, so your client code stays the same, and submit a patch to
> mason's authors when you're happy with it :
>
> *HTML::Mason::FakeApache::filename = sub{ return $ENV{SCRIPT_FILENAME} };
>
> Does $ENV{SCRIPT_FILENAME} contain what you want?
>
> J.
>
> On 23 September 2010 17:35, Bill Walz <walzb...@gmail.com> wrote:
> > I have found that not all methods are available when running under cgi
> and
> > fake apache vs $r Apache2::RequestRec.
> >
> > You could always try to use:
> >
> > stat($ENV{SCRIPT_FILENAME})
> >
> > That should work.
> >
> > -Bill
> >
> > On 09/23/2010 09:09 AM, charmie maniar wrote:
> >
> > Hi,
> >
> > I am using mason in a CGI mode on IIS 6.0, windows server 2003 and I am
> > getting the following error:
> > Can't locate object method "filename" via package
> "HTML::Mason::FakeApache"
> > at D:\test\advising\templates\autohandler line 8, <DATA> line 522.
> >
> > Here is the code snippet :
> >
> >
> > <%method .timestamp>
> > % my @month = qw( January February March April May June July August
> > September October November December );
> > % my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
> > localtime((stat($r->filename))[9]);
> > Updated: <% $month[$mon] %> <% $mday %>, <% $year + 1900 %>
> > </%method>
> >
> > What is filename? And what is the function localtime doing here. In my
> > belief it is generating files with names that include the date of
> > generation. Please correct me if I am wrong.
> > Not much information is available online about the FakeApache package, so
> if
> > anyone can help me with the error it would be great.
> >
> > Thanks,
> > Charmie
> >
> >
> ------------------------------------------------------------------------------
> > Nokia and AT&T present the 2010 Calling All Innovators-North America
> contest
> > Create new apps & games for the Nokia N8 for consumers in U.S. and
> Canada
> > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
> marketing
> > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> > http://p.sf.net/sfu/nokia-dev2dev
> >
> > _______________________________________________
> > Mason-users mailing list
> > Mason-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/mason-users
> >
> >
> >
> ------------------------------------------------------------------------------
> > Nokia and AT&T present the 2010 Calling All Innovators-North America
> contest
> > Create new apps & games for the Nokia N8 for consumers in U.S. and
> Canada
> > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
> marketing
> > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> > http://p.sf.net/sfu/nokia-dev2dev
> > _______________________________________________
> > Mason-users mailing list
> > Mason-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/mason-users
> >
> >
>
>
>
> --
> Jerome Eteve.
> http://www.eteve.net
> jer...@eteve.net
>
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users